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