Here you can find the source of getMillisFromString(String s)
public static long getMillisFromString(String s) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.ParseException; import java.util.Date; public class Main { public static long getMillisFromString(String s) throws ParseException { // TODO locale support DateFormat formater = DateFormat.getDateTimeInstance(); Date date = formater.parse(s); return date.getTime(); }/*from w w w . j a va 2 s.co m*/ }