Here you can find the source of nowMillis()
public static String nowMillis()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String nowMillis() { SimpleDateFormat formater = new SimpleDateFormat("yyyyMMddHHmmssSSS"); Date d = new Date(); return formater.format(d); }//from ww w . j ava2 s . c om }