Here you can find the source of geLongFromString(final String date)
public static long geLongFromString(final String date)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import android.util.Log; public class Main { public static long geLongFromString(final String date) { final Calendar calendar = getCalendarFromString(date); return calendar.getTimeInMillis(); }// w ww . j a v a 2 s . c o m public static Calendar getCalendarFromString(final String date) { final SimpleDateFormat inputFormat = new SimpleDateFormat( "E, MMMM dd, yyyy"); Date parsedDate = new Date(); try { parsedDate = inputFormat.parse(date.trim()); } catch (final ParseException e) { Log.e("DATE_PARSER", "Error: Impossible to parse input string to calendar.", e); throw new RuntimeException(e); } final Calendar currentDate = Calendar.getInstance(); currentDate.setTime(parsedDate); return currentDate; } }