Java Parse Date parseDate(String str)

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

Description

parse Date

License

Apache License

Declaration

static Long parseDate(String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    private static final DateFormat dateDirNameFormatter__ = new SimpleDateFormat("yyyyMMdd");

    static Long parseDate(String str) {
        try {/*from  www. j  ava2  s  . com*/
            synchronized (dateDirNameFormatter__) {
                return new Long(dateDirNameFormatter__.parse(str).getTime());
            }
        } catch (ParseException pe) {
            return null;
        }
    }
}

Related

  1. parseDate(String sDateTime, String sPattern)
  2. parseDate(String source, String format)
  3. parseDate(String src, String pattern)
  4. parseDate(String srtDate, String pattern)
  5. parseDate(String str)
  6. parseDate(String str)
  7. parseDate(String str)
  8. parseDate(String str)
  9. parseDate(String str)