Android Date String Parse parse(String pattern, String date)

Here you can find the source of parse(String pattern, String date)

Description

parse

Declaration

public static long parse(String pattern, String date) 

Method Source Code

//package com.java2s;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Main {
    public static long parse(String pattern, String date) {
        final SimpleDateFormat sdf = new SimpleDateFormat(pattern);
        try {/*from   ww  w.  j  a  va2s  .  co m*/
            return sdf.parse(date).getTime();
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return 0;
    }
}

Related

  1. fromSlDateTime(final String dateString, final String timeString)
  2. convertTimeStumpToDate(String time)
  3. convertimeStumpToDate2(String time)
  4. convertDateTimeStrFormat(String dateStr, String pattern, String newPattern)
  5. convertStringToDate(String strDate, String pattern)
  6. parse3339(String time)
  7. parseDate(String date)
  8. parseDate(String date)
  9. parseDate(String rawDate)