Here you can find the source of format(Long dateTmie, String formate)
public static final String format(Long dateTmie, String formate)
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; public class Main { public static final String format(Date date, String formate) { if (date == null) { return ""; }//www .j a va 2 s.c o m return getFormat(formate).format(date); } public static final String format(Long dateTmie, String formate) { Date date = new Date(dateTmie); return getFormat(formate).format(date); } public static final DateFormat getFormat(String format) { return new SimpleDateFormat(format); } }