Here you can find the source of parseDate(String str, String pattern)
public static Date parseDate(String str, String pattern)
//package com.java2s; //License from project: Open Source License import java.util.Date; public class Main { public static Date parseDate(String str, String pattern) { java.text.DateFormat format = new java.text.SimpleDateFormat(pattern); Date date = null;// w w w. j a va 2s .co m try { date = format.parse(str); } catch (Exception e) { } return date; } }