Java Parse Date Pattern YYYY parseMysql(String s)

Here you can find the source of parseMysql(String s)

Description

parse Mysql

License

Apache License

Declaration

public static Date parseMysql(String s) 

Method Source Code


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

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

import java.util.Date;

public class Main {
    public static Date parseMysql(String s) {
        try {//w w  w  .j av  a  2  s. com
            DateFormat fmtTemp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            return fmtTemp.parse(s);
        } catch (ParseException e) {
            return null;
        }
    }
}

Related

  1. parseHHMMSS(long time)
  2. parseInsituFileNameDateFormat(String timeString)
  3. parseLastModifDate(final File file)
  4. parseLogstashDate(final String date_string)
  5. parsemm(String dateStr)
  6. parseMysqlDate(String dateStr)
  7. parseMySQLDateString(String s)
  8. parseMySQLDateTime(String date)
  9. parseNanos(final String date)