Here you can find the source of getTime(long time)
Parameter | Description |
---|---|
time | The time in milliseconds. |
public static String getTime(long time)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { /**/*from www. j a v a 2 s . co m*/ * Creates a timestamp using the Timestamp class. * * @param time * The time in milliseconds. * @return The time in military format with seconds. */ public static String getTime(long time) { String stamp = new Timestamp(time).toString(); return stamp.substring(0, stamp.length() - 4); } }