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 formatPattern, String dateStr)
parse Date
return getSdf(formatPattern).parse(dateStr);
DateparseDate(String formattedDate)
parse Date
Date parsedDate = null;
try {
    parsedDate = new SimpleDateFormat(DATE_TIME_PATTERN).parse(formattedDate);
} catch (Exception e) {
    throw new RuntimeException(
            "Couldn't parse date: " + formattedDate + " using pattern '" + DATE_TIME_PATTERN + "'.");
return parsedDate;
...
DateparseDate(String gameDate)
parse Date
if (gameDate == null) {
    throw new ParseException("gameDate cannot be null.", 0);
if (gameDate.length() != 8) {
    throw new ParseException(gameDate + " must be of length 8, not " + gameDate.length(),
            gameDate.length() < 8 ? gameDate.length() : gameDate.length() - 8);
return DATE_FORMATTER.parse(gameDate);
...
DateparseDate(String in)
parse Date
ParseException lastException = null;
for (SimpleDateFormat format : getSupportedFormats())
    try {
        return format.parse(in);
    } catch (ParseException e) {
        lastException = e;
throw lastException;
...
StringparseDate(String input)
parse Date
if ("NULL".equals(input)) {
    return null;
if (input.length() == 24 && input.startsWith("CAST")) {
    String text = input.substring(7, 7 + 8);
    StringBuilder invertedBuilder = new StringBuilder();
    for (int i = 3; i >= 0; i--) {
        invertedBuilder.append(text.substring(2 * i, 2 * i + 2));
...
DateparseDate(String line)
parse Date
if (!isLogEntryStart(line)) {
    return null;
SimpleDateFormat parser = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
try {
    return parser.parse(line.substring(0, 23));
} catch (ParseException e) {
    return null;
...
java.util.DateparseDate(String myDate, String pattern)
Parses a string into a date.
if (myDate == null || pattern == null)
    throw new ParseException("Null arguments!", 0);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
java.util.Date uDate = simpleDateFormat.parse(myDate);
return (uDate);
CalendarparseDate(String partten, String datatime)
parse Date
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat(partten);
format.parse(datatime);
return format.getCalendar();
DateparseDate(String representedValue)
parse Date
Date date = null;
for (final String pattern : TIMEPATTERNS) {
    try {
        date = new SimpleDateFormat(pattern).parse(representedValue);
    } catch (final Exception e) {
    if (date != null) {
        return date;
...
java.util.DateparseDate(String s)
parse Date
try {
    SimpleDateFormat myDateFormat = ISO_DATE_FORMATS.get();
    if (myDateFormat == null) {
        myDateFormat = new SimpleDateFormat(isoDatePattern);
        ISO_DATE_FORMATS.set(myDateFormat);
    return myDateFormat.parse(s);
} catch (ParseException ex) {
...