Java tutorial
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.text.SimpleDateFormat; public class Main { public static String getTempFileName() { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss_SS"); return format.format(new Timestamp(System.currentTimeMillis())); } }