Here you can find the source of toSqlDate(Date date)
public static java.sql.Date toSqlDate(Date date)
//package com.java2s; //License from project: Apache License import java.util.Date; public class Main { public static java.sql.Date toSqlDate(Date date) { if (date != null) { return new java.sql.Date(date.getTime()); } else {/*from w w w . j a v a2s .com*/ return null; } } }