Java Millisecond Current Get getMillisFromString(String s)

Here you can find the source of getMillisFromString(String s)

Description

get Millis From String

License

Open Source License

Declaration

public static long getMillisFromString(String s) throws ParseException 

Method Source Code


//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*/
}

Related

  1. getMillisec_old(String isoDate)
  2. getMillisecondStamp(Date date)
  3. getMilliSecondToTomorrow(Date date)
  4. getMillisFromISO8601(Object iso8601)
  5. getMillisFromRFC822String(Object rfc822)
  6. getMillisFromYYYYMMDD(Object yyyymmdd)
  7. getMillisId()
  8. getMillisOfTowDiffDate(String p_startDate, String p_endDate)
  9. getMillon(long time)