Here you can find the source of getSqlTimeStamp()
public static Timestamp getSqlTimeStamp()
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { public static Timestamp getSqlTimeStamp() { java.sql.Date date = new java.sql.Date(System.currentTimeMillis()); Timestamp timestamp = new Timestamp(date.getTime()); return timestamp; }/* w w w. ja v a 2s . c o m*/ }