Here you can find the source of getCurrentDateTimestamp()
public static Timestamp getCurrentDateTimestamp()
//package com.java2s; import java.sql.Timestamp; import java.text.DateFormat; import java.text.SimpleDateFormat; public class Main { public static Timestamp getCurrentDateTimestamp() { DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Timestamp createDttm = Timestamp.valueOf(df.format(new java.util.Date())); return createDttm; }//from w w w. j av a2 s . com }