Here you can find the source of dateUtil(long date)
public static String dateUtil(long date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String dateUtil(long date) { Date d = new Date(); d.setTime(date);/* www . j a va2s . c o m*/ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", java.util.Locale.getDefault()); String str = sdf.format(d); return str; } }