Here you can find the source of parseDate(String dateString, String dateFormat)
public static Date parseDate(String dateString, String dateFormat) throws ParseException
//package com.java2s; import java.text.*; import java.util.*; public class Main { /**/*from w w w. j av a 2 s. c om*/ * Parses the date from the given string, and the given format */ public static Date parseDate(String dateString, String dateFormat) throws ParseException { Calendar cal = Calendar.getInstance(); if (dateString != null) return new SimpleDateFormat(dateFormat).parse(dateString); throw new ParseException("Parse Exception manually thrown by parseDate(String, String)", 0); } }