Here you can find the source of getTimeStamp()
public static String getTimeStamp()
//package com.java2s; import java.util.Date; import java.sql.Timestamp; public class Main { /**/*from w ww. j av a 2 s . c om*/ * Create logfile TimeStamp * @return [1112749658] */ public static String getTimeStamp() { Timestamp ts = new Timestamp((new Date()).getTime()); String strTime = String.valueOf(ts.getTime()); if (strTime.length() > 10) { strTime = strTime.substring(0, 10); } return strTime; } }