Here you can find the source of getReadableTimeStamp(long timeStamp)
Parameter | Description |
---|---|
timeStamp | System time in milliseconds |
public static String getReadableTimeStamp(long timeStamp)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { /**//from w w w . j a v a2 s. c o m * Generate file name from system time in the format "yyyy-MM-dd HH:mm:ss:SSS", * @param timeStamp System time in milliseconds */ public static String getReadableTimeStamp(long timeStamp) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS", Locale.US) .format(new Date(timeStamp)); } }