Here you can find the source of parseDate(String value, String pattern)
public static java.util.Date parseDate(String value, String pattern)
//package com.java2s; import java.text.*; import java.util.TimeZone; public class Main { public static java.util.Date parseDate(String value, String pattern) { try {/*from w w w . j av a2 s. com*/ TimeZone tz = TimeZone.getDefault(); String dateFormat = pattern; SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); sdf.setTimeZone(tz); // Parse date java.util.Date parsed = null; parsed = sdf.parse(value); return parsed; } catch (ParseException e) { return null; } } }