Here you can find the source of parseDate(String strDate, String format)
public static Date parseDate(String strDate, String format) throws Exception
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parseDate(String strDate, String format) throws Exception { ParsePosition pos = new ParsePosition(0); DateFormat df = new SimpleDateFormat(format); Date strtodate = df.parse(strDate, pos); return strtodate; }/*from w w w . j av a 2s .c o m*/ }