Java Date Format ISO parseIsoDateTime(final String isoDateString, final String dateFormat)

Here you can find the source of parseIsoDateTime(final String isoDateString, final String dateFormat)

Description

parse Iso Date Time

License

Open Source License

Declaration

public static Date parseIsoDateTime(final String isoDateString, final String dateFormat) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.TimeZone;

public class Main {
    public static Date parseIsoDateTime(final String isoDateString, final String dateFormat) {
        final DateFormat df = new SimpleDateFormat(dateFormat);
        df.setTimeZone(TimeZone.getDefault());
        Date date;//from www. j av a2  s  . c o m
        try {
            date = df.parse(isoDateString);
        } catch (final ParseException ex) {
            return null;
        }
        return date;
    }
}

Related

  1. makeDateISO8601(Date date)
  2. millisecondsToISO8601(long date)
  3. NowFormatISO()
  4. nowISO8601()
  5. parseISODateFormat(String dateStr)
  6. timeToIso8601(long time, boolean includeTime)
  7. toBasicISO8601DateTime(Date value)
  8. toDateIso(Date date)
  9. toISO2616DateFormat(Date date)