Here you can find the source of parseDate(String sDate, String sFormat)
public static java.util.Date parseDate(String sDate, String sFormat) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; public class Main { public static java.util.Date parseDate(String sDate, String sFormat) throws ParseException { java.text.SimpleDateFormat formatter = null; java.util.Date utildate = null; formatter = new java.text.SimpleDateFormat(sFormat); utildate = formatter.parse(sDate); return utildate; }// w w w .ja v a 2 s.co m }