Here you can find the source of parseDate(String date)
public static Date parseDate(String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; public static Date parseDate(String date) { try {// w w w.ja v a 2 s.c om SimpleDateFormat dateFormat = new SimpleDateFormat( DEFAULT_DATE_FORMAT); return dateFormat.parse(date); } catch (ParseException e) { e.printStackTrace(); } return new Date(); } }