Here you can find the source of parseDate(String src, String pattern)
public static Date parseDate(String src, String pattern) throws ParseException
//package com.java2s; //License from project: LGPL import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parseDate(String src, String pattern) throws ParseException { return getSDFormat(pattern).parse(src); }// w w w . java 2 s . c o m private static SimpleDateFormat getSDFormat(String pattern) { return new SimpleDateFormat(pattern); } }