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