Here you can find the source of parseDate(String sDate)
public static java.util.Date parseDate(String sDate)
//package com.java2s; public class Main { public static java.util.Date parseDate(String sDate) { java.text.DateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); java.util.Date retDate = null; try {/*from ww w.j ava 2 s . c o m*/ retDate = formatter.parse(sDate); } catch (Exception ex) { } return retDate; } public static java.util.Date parseDate(String sDate, String format) { java.text.DateFormat formatter = new java.text.SimpleDateFormat(format); java.util.Date retDate = null; try { retDate = formatter.parse(sDate); } catch (Exception ex) { } return retDate; } }