Here you can find the source of parseSqlDate(java.util.Date date)
public static java.sql.Date parseSqlDate(java.util.Date date)
//package com.java2s; //License from project: Open Source License public class Main { public static java.sql.Date parseSqlDate(java.util.Date date) { if (date != null) { return new java.sql.Date(date.getTime()); } else {// ww w . ja v a2 s .co m return null; } } public static String getTime(java.util.Date date) { return format(date, "HH:mm:ss"); } public static String format(java.util.Date date, String format) { String result = ""; try { if (date != null) { java.text.DateFormat df = new java.text.SimpleDateFormat(format); result = df.format(date); } } catch (Exception e) { } return result; } public static String format(java.util.Date date) { return format(date, "yyyy/MM/dd"); } }