Java Parse Date parseDate(String date)

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

Description

parse Date

License

Apache License

Declaration

public static Date parseDate(String date) 

Method Source Code


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

import java.text.SimpleDateFormat;

import java.util.Date;

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

    public static Date parseDate(String date) {
        SimpleDateFormat format = new SimpleDateFormat(common_pattern);
        try {//from  ww  w . j  ava 2s .  c  o m
            return format.parse(date);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;

    }
}

Related

  1. parseDate(String date)
  2. parseDate(String date)
  3. parseDate(String date)
  4. parseDate(String date)
  5. parseDate(String date)
  6. parseDate(String date)
  7. parseDate(String date)
  8. parseDate(String date, Locale locale)
  9. parseDate(String date, String expression)