Here you can find the source of parseDate(String date)
public static Date parseDate(String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parseDate(String date) { try {//from w ww . java2 s. com return new SimpleDateFormat("yyyy-MM-dd").parse(date); } catch (ParseException e) { return null; } } }