Here you can find the source of getLongTime()
public static String getLongTime()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getLongTime() { Date curDate = new Date(System.currentTimeMillis()); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmssSSS"); String result = sdf.format(curDate); return result; }/*from w w w . ja v a2 s . c o m*/ }