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