Here you can find the source of reverseFormattedDateWithMilliseconds()
public static String reverseFormattedDateWithMilliseconds()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String reverseFormattedDateWithMilliseconds() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS"); String formatted = format.format(cal.getTime()); assert (formatted != null); return formatted; }// ww w .j a v a 2 s . c om }