Here you can find the source of str2TimeMillis(String str)
public static long str2TimeMillis(String str)
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static long str2TimeMillis(String str) { SimpleDateFormat sdf = new SimpleDateFormat( "EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); Date date = null;/*ww w .java2 s . co m*/ try { date = (Date) sdf.parse(str); } catch (ParseException e) { e.printStackTrace(); } return date.getTime(); } }