Here you can find the source of parseDate(String source, String format)
public static Date parseDate(String source, String format)
//package com.java2s; //License from project: LGPL import java.text.SimpleDateFormat; import java.util.Date; import java.text.ParseException; public class Main { public static Date parseDate(String source, String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); try {/*w ww . ja v a 2 s . c om*/ return sdf.parse(source); } catch (ParseException e) { return null; } } }