Java Date Long Format getLongMillis(String date)

Here you can find the source of getLongMillis(String date)

Description

get Long Millis

License

Open Source License

Declaration

public static long getLongMillis(String date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Main {
    private static final SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static long getLongMillis(String date) {
        try {/*from  ww w.j av  a2 s. com*/
            return dateTimeFormat.parse(date).getTime();
        } catch (ParseException e) {
            return 0;
        }

    }
}

Related

  1. getLongDisplayDate(Date moment, TimeZone tz, Locale inLocale)
  2. getLongDisplayTime(long time)
  3. getLongFormatTime(java.util.Date date)
  4. getLongFromDatestamp(String datestamp)
  5. getLongGmtDateString(Date date)
  6. getLongNowTime()
  7. getLongOracleDateTime(Date date)
  8. getLongPattern(final Locale locale)
  9. getLongTime()