Here you can find the source of toSqlDateFromStrDate(String p_strDate)
public static java.sql.Date toSqlDateFromStrDate(String p_strDate) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.ParseException; public class Main { public static java.sql.Date toSqlDateFromStrDate(String p_strDate) throws ParseException { java.sql.Date returnDate = null; java.text.DateFormat sdf = new java.text.SimpleDateFormat(); if (p_strDate != null && (!"".equals(p_strDate))) { returnDate = new java.sql.Date(sdf.parse(p_strDate).getTime()); }/*from w ww. ja va2 s .c o m*/ return returnDate; } }