Here you can find the source of getFormat(long stamp)
public static String getFormat(long stamp)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**// w ww .ja v a2 s. c om * Get the dateFormat from given timestamp in milliseconds and the pattern * * @param stamp The timestamp (System.currentTimeMillis()) * @param pattern The pattern (e.g.: 'dd.MM.yyyy HH:mm:ss.SSS') * @return The format as string */ public static String getFormat(long stamp, String pattern) { return new SimpleDateFormat(pattern).format(new Date(stamp)); } public static String getFormat(long stamp) { return getFormat(stamp, "dd.MM.yyyy HH:mm:ss.SSS"); } }