Java Utililty Methods Parse Date

List of utility methods to do Parse Date

Description

The list of methods to do Parse Date are organized into topic(s).

Method

DateparseDate(String dateString)
Parses the string to a date.
return LOCAL_FORMAT.get().parse(dateString);
java.util.DateparseDate(String dateString)
parse Date
DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
return df.parse(dateString);
DateparseDate(String dateString)
parse Date
return DATE_FORMAT.get().parse(dateString);
DateparseDate(String dateString)
parse Date
return parseDate(dateString, _listFormat);
DateparseDate(String dateString)
Method parseDate.
if (dateString == null)
    return null;
if (dateString.length() == 0)
    return null;
Date javaDate = null;
dateString = dateString.trim();
if (dateString.length() <= 10) 
    try {
        javaDate = new SimpleDateFormat("MM/dd/yyyy").parse(dateString);
    } catch (ParseException pe) {
else if (dateString.length() > 10) 
    try {
        javaDate = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss aa").parse(dateString);
    } catch (ParseException pe) {
    if (javaDate == null) {
        try {
            javaDate = new SimpleDateFormat("MM/dd/yyyy hh:mm aaa").parse(dateString);
        } catch (ParseException pe) {
return javaDate;
DateparseDate(String dateString)
parse Date
if (isStringEmptyOrNull(dateString)) {
    return null;
try {
    return getDateFormat().parse(dateString);
} catch (ParseException e) {
    throw new IllegalArgumentException("Invalid date string");
DateparseDate(String dateString)
parse Date
String dateFormat = determineDateFormat(dateString);
if (dateFormat == null) {
    return null;
SimpleDateFormat df = new SimpleDateFormat(dateFormat);
return df.parse(dateString);
DateparseDate(String dateString)
Go over all date formats and try to format the given date string
ParseException exception = null;
for (String format : DATE_FORMATS) {
    try {
        return new SimpleDateFormat(format).parse(dateString);
    } catch (ParseException e) {
        exception = e;
throw exception;
DateParseDate(String dateString)
Parses a date object from a string representation.
return ParseDate(dateString, "MM/dd/yyyy");
DateparseDate(String dateString)
Genera un objeto Date a partir de una cadena con una fecha
SimpleDateFormat dateFormat = new SimpleDateFormat(FORMATDATE);
Date date;
try {
    date = dateFormat.parse(dateString);
} catch (Exception e) {
    date = null;
return date;
...