Here you can find the source of getSqlDate(int year, int month, int day)
public static Date getSqlDate(int year, int month, int day)
//package com.java2s; import java.sql.Date; import java.util.Calendar; public class Main { public static Date getSqlDate(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day, 0, 0, 0); return new Date(calendar.getTimeInMillis()); }/*from w w w .j av a 2 s .c o m*/ }