Here you can find the source of getDateFromString(String string)
public static Date getDateFromString(String string)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static Date getDateFromString(String string) { Date date = new Date(); try {// w w w .jav a2s. co m SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.ENGLISH); date = formatter.parse(string); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return date; } }