Here you can find the source of todaySQL()
public static java.sql.Date todaySQL()
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**// w ww . j a v a 2 s . com * a date set at midnight * @return */ public static java.sql.Date todaySQL() { return new java.sql.Date(today().getTime()); } /** * today's date * with time set at midnight * @return */ public static Date today() { Calendar calNow = Calendar.getInstance(); calNow.set(Calendar.HOUR, 0); calNow.set(Calendar.MINUTE, 0); calNow.set(Calendar.SECOND, 0); calNow.set(Calendar.MILLISECOND, 0); return calNow.getTime(); } }