Here you can find the source of nowFile()
public static String nowFile()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static SimpleDateFormat fileDateTimeFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH-mm-ss-SSS"); public static String nowFile() { return fileDateTimeFormat.format(new Date()); }//from w w w.ja v a 2 s. c om }