Java Parse Date parseDate4UrlCreateTime(String dateStr)

Here you can find the source of parseDate4UrlCreateTime(String dateStr)

Description

parse Date Url Create Time

License

Open Source License

Declaration

public static Date parseDate4UrlCreateTime(String dateStr) 

Method Source Code


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

public class Main {
    private final static String FMT_4_URL_CREATETIME = "yyyy-MM-dd HH:mm:ss";

    public static Date parseDate4UrlCreateTime(String dateStr) {
        Date result = null;//from   ww w . jav  a2 s. c o m
        try {
            result = new SimpleDateFormat(FMT_4_URL_CREATETIME).parse(dateStr);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return result;
    }
}

Related

  1. parseDate(String value)
  2. parseDate(String value, Class targetType, String... formats)
  3. parseDate(String value, String formater)
  4. parseDate(String value, String pattern)
  5. parseDate2String(Date date)
  6. parseDateAllowNull(String date)
  7. parseDateAndGetLong(String date)
  8. parseDateAsString(Date value)
  9. parseDateForFilter(String date)