Here you can find the source of parseTimestamp(Long time, String pattern)
public static String parseTimestamp(Long time, String pattern)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String parseTimestamp(Long time, String pattern) { String dateStr = ""; if (time != 0) { SimpleDateFormat sdf = new SimpleDateFormat(pattern); Date date = new Date(time); dateStr = sdf.format(date);/*from www .ja va2 s. c o m*/ } return dateStr; } }