Android Date String Parse String2Date(String dateStr)

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

Description

String Date

Declaration

public static Date String2Date(String dateStr) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

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

    public static Date String2Date(String dateStr) {
        Date date = null;//from  ww w .  j  ava2  s . c o  m
        try {
            date = dateFormate.parse(dateStr);
        } catch (java.text.ParseException e) {
            e.printStackTrace();
        }
        return date;
    }
}

Related

  1. str2Date(String str)
  2. stringConvertDate(String date)
  3. stringToDate(String date)
  4. toDate(String string)
  5. tokenizeDate(String date)
  6. changeDateWithSplit(String argDate, String split)
  7. isValidDate(String sDate)
  8. getDateTimeFromString(String dateTimeString, String format)
  9. convertStringToDate(String date, String time)