Android Time Parse str2TimeMillis(String str)

Here you can find the source of str2TimeMillis(String str)

Description

str Time Millis

Declaration

public static long str2TimeMillis(String str) 

Method Source Code

//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();
    }
}

Related

  1. isRFC3339Date(String date)
  2. parseTime(String time)
  3. parseTimeString(final String time)
  4. str2Time(String str)
  5. time(String tag)
  6. toModifiedTimeDate(double modDouble)
  7. toModifiedTimeDate(String modified)
  8. toStandardTime(String compactTime)