Here you can find the source of getCurrentAccurateDateTimeStringForPrint()
public static String getCurrentAccurateDateTimeStringForPrint()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getCurrentAccurateDateTimeStringForPrint() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); return df.format(new Date()); }//from w ww . j av a 2s .co m }