Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date convertDate(String dateToFormat) { SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy"); Date date = null; try { date = dateFormat.parse(dateToFormat); } catch (java.text.ParseException e) { date = null; } return date; } }