Here you can find the source of convertToSQLDate(java.util.Date date)
public static final java.sql.Date convertToSQLDate(java.util.Date date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; public class Main { private static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat( "yyyy-MM-dd"); public static final java.sql.Date convertToSQLDate(java.util.Date date) { if (date != null) { String formated = DATEFORMAT.format(date); return java.sql.Date.valueOf(formated); }//w ww.j a va 2 s .c o m return null; } }