Java tutorial
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date stringToDate(String dateString) { try { SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy"); return format.parse(dateString); } catch (ParseException e) { return null; } } }