Here you can find the source of toSqlTimestamp(Date d)
public static Timestamp toSqlTimestamp(Date d)
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; import java.util.Date; public class Main { public static Timestamp toSqlTimestamp(Date d) { return new Timestamp(d.getTime()); }//w w w . j a v a 2s . com }