Java Parse Date Pattern YYYY parseMySQLDateTime(String date)

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

Description

parse My SQL Date Time

License

Open Source License

Declaration

public static Date parseMySQLDateTime(String date) 

Method Source Code


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

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

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

    public static Date parseMySQLDateTime(String date) {
        try {/*from ww  w  .java 2s  .  c o m*/
            return mySQLDateTimeFormat.parse(date);
        } catch (ParseException e) {
            e.printStackTrace();
        }

        return null;
    }
}

Related

  1. parseLogstashDate(final String date_string)
  2. parsemm(String dateStr)
  3. parseMysql(String s)
  4. parseMysqlDate(String dateStr)
  5. parseMySQLDateString(String s)
  6. parseNanos(final String date)
  7. parseOpenMrsDate(String date)
  8. parseOpenMrsDate(String date)
  9. parsePurgeDateString(String str)