Here you can find the source of toDate(String date)
public static Date toDate(String date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static SimpleDateFormat _data = new SimpleDateFormat("dd/MM/yyyy"); public static Date toDate(String date) { Date d = null;//from w w w . ja v a 2 s .c om try { d = _data.parse(date); } catch (Exception e) { } return d; } }