Here you can find the source of ParseDate(String str)
public static Date ParseDate(String str)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date ParseDate(String str) { SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd hh:mm:ss"); Date addTime = null;/*from ww w . j ava 2 s . c o m*/ try { addTime = dateFormat.parse(str); } catch (ParseException e) { e.printStackTrace(); } return addTime; } }