Here you can find the source of parseSimpleDate(String dateString)
public static Date parseSimpleDate(String dateString)
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import android.util.Log; public class Main{ public static Date parseSimpleDate(String dateString) { SimpleDateFormat formatter = new SimpleDateFormat("DD/MM/yy", Locale.UK);//from w w w . j av a 2s. co m Date date = null; try { date = (Date) formatter.parse(dateString); } catch (ParseException e) { e.printStackTrace(); } return date; } }