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 date)
parse Date
if (date == null)
    return null;
return parseDate(date, DATESTYLE);
DateparseDate(String date)
Parses a string into a date.
if (date == null) {
    return null;
try {
    int p = date.indexOf('.');
    if (p >= 0) {
        int q = p + 1;
        while (q < date.length() && Character.isDigit(date.charAt(q))) {
...
DateparseDate(String date)
Parses the date, expected to be in the format 2020-12-31T23:59:59.123Z
try {
    return new SimpleDateFormat(DATE_FORMAT).parse(date);
} catch (ParseException e) {
    throw new IllegalArgumentException("Invalid date: " + date, e);
DateTimeparseDate(String date)
parse Date
try {
    return new DateTime(inputDateFormat.parse(date));
} catch (ParseException e) {
    throw e;
java.util.DateparseDate(String date)
parse Date
return parseDate(DEFAULT_DATE_TIME_PATTERN, date);
DateparseDate(String date)
Parses a textual representation of a Date based on the XMPP standard format and returns a Date.
synchronized (UTC_FORMAT) {
    return UTC_FORMAT.parse(date);
DateparseDate(String date)
Parst Datum aus String mit SimpleDateFormat
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");
Date output = format.parse(date);
return output;
DateparseDate(String date)
parse Date
return parseDate(date, "yyyy-MM-dd");
DateparseDate(String date)

Parses a date string to a Date instance using format "ddMMyyyy".

SimpleDateFormat format = new SimpleDateFormat("ddMMyyyy");
return format.parse(date);
DateparseDate(String date)
parse date with the default pattern
SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT);
try {
    return format.parse(date);
} catch (ParseException e) {
    return new Date();