Here you can find the source of getTimestamp(long milliseconds)
public static String getTimestamp(long milliseconds)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getTimestamp(long milliseconds) { SimpleDateFormat dformat = new SimpleDateFormat( "YYYY:MM:dd:HH:mm:ss:SS"); Date d = new Date(milliseconds); String dstr = dformat.format(d); return dstr; }/*from w w w . java2 s . c o m*/ }