Here you can find the source of toSqlDate(Date dt)
public static Timestamp toSqlDate(Date dt)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Date; public class Main { public static Timestamp toSqlDate(Date dt) { if (dt == null) { return null; }/*from w w w .j a va 2 s .c o m*/ return new Timestamp(dt.getTime()); } }