Here you can find the source of parseDate(String date)
public static Date parseDate(String date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final SimpleDateFormat DATE_FORMATOR = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); public static Date parseDate(String date) { try {/*from w ww. jav a 2s. c om*/ return DATE_FORMATOR.parse(date); } catch (Exception e) { return null; } } }