Here you can find the source of getLongDateString(Date date)
public static String getLongDateString(Date date)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String longFormat = "yyyyMMddHHmmss"; public static String getLongDateString(Date date) { return getLongDateString(date, TimeZone.getDefault()); }//from ww w . ja v a2s . c o m public static String getLongDateString(Date date, TimeZone zone) { if (date == null) return null; DateFormat dateFormat = new SimpleDateFormat(longFormat); dateFormat.setTimeZone(zone); return dateFormat.format(date); } }