Here you can find the source of getCurTimestamp()
public static Timestamp getCurTimestamp()
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final SimpleDateFormat formatTimestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static Timestamp getCurTimestamp() { return Timestamp.valueOf(formatTimestamp.format(new Date())); }/*from ww w . jav a2 s . c om*/ }