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