Here you can find the source of formatFullDate(Object date)
public static String formatFullDate(Object date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String formatFullDate(Object date) { return formatDate(date, "yyyy-MM-dd HH:mm:ss"); }/*w w w .j a va2 s . c om*/ public static String formatDate(Object date, String fmt) { if (date == null) { return null; } if (!(date instanceof Date)) { return date.toString(); } SimpleDateFormat sdf = new SimpleDateFormat(fmt); return sdf.format(date); } }