Android Date String to Date Convert parseDate(String dateString)

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

Description

parse Date, "yyyy-MM-dd HH:mm"

Declaration

public static Date parseDate(String dateString) 

Method Source Code

//package com.java2s;

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

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

    public static Date parseDate(String dateString) {
        SimpleDateFormat sdf = new SimpleDateFormat(
                FORMAT_DATE_AND_TIME_YYYY_MM_DD_HH_MM);
        try {//from   w w w . jav  a  2s .  c o m
            return sdf.parse(dateString);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}

Related

  1. parseCalDav(String date)
  2. parseCalDavDue(String date)
  3. parseDBDateTime(String date)
  4. parseDate(String date)
  5. parseDate(String date, SimpleDateFormat format)
  6. parseDateTime(String date)
  7. parseTaskWarrior(String date)
  8. getDate(String sDate, String dateFormat)
  9. convertStringToDate(String dateString, String currentFormat)