Java tutorial
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Locale; public class Main { public static long getLongFromDate(String date) { SimpleDateFormat sdf = new SimpleDateFormat("E,dd MMM yyyy", Locale.US); long time = 0; try { time = sdf.parse(date).getTime(); } catch (ParseException e) { e.printStackTrace(); } return time; } }