Here you can find the source of parseDate(String date)
public static Date parseDate(String date) throws ParseException
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parseDate(String date) throws ParseException { if (date == null) return null; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); return sdf.parse(date); }//from w w w .j a v a 2 s . c o m public static Date parseDate(String date, String pattern) throws ParseException { if (date == null) return null; SimpleDateFormat sdf = new SimpleDateFormat(pattern); return sdf.parse(date); } }