Here you can find the source of parseDate(String strDate)
public static Date parseDate(String strDate)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static String defaultDatePattern = "yyyy-MM-dd"; public static final Date parseDate(String strDate, String format) { SimpleDateFormat df = new SimpleDateFormat(format); try {//from w w w .j a v a 2 s. c o m return df.parse(strDate); } catch (ParseException pe) { } return null; } public static Date parseDate(String strDate) { return parseDate(strDate, getDatePattern()); } public static String getDatePattern() { return defaultDatePattern; } }