Here you can find the source of getFormatDateString(String format, long date)
public static final String getFormatDateString(String format, long date)
//package com.java2s; public class Main { public static final String getFormatDateString(String format) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat( format);/* ww w . ja v a2 s. c om*/ java.util.Date d = new java.util.Date(); return sdf.format(d); } public static final String getFormatDateString(String format, java.util.Date date) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat( format); return sdf.format(date); } public static final String getFormatDateString(String format, long date) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat( format); return sdf.format(new java.util.Date(date)); } }