Java Date ISO Parse isoDateStringToDate(String dateString)

Here you can find the source of isoDateStringToDate(String dateString)

Description

Converts an ISO-formatted String representation of a date to a Date object.

License

Open Source License

Return

a object corresponding to given date string

Declaration

public static Date isoDateStringToDate(String dateString) throws ParseException 

Method Source Code

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

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

import java.util.Date;

public class Main {
    /**/*from w ww.ja  va2s  .c o m*/
     * Converts an ISO-formatted {@link String} representation of a date to a {@link Date} object.
     *
     * @return  a {@link Date} object corresponding to given date string
     * @see     #dateToIsoDateString(Date)
     * @see     #dateToIsoDateString(Date, DateFallback)
     */
    public static Date isoDateStringToDate(String dateString) throws ParseException {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(dateString);
    }
}

Related

  1. iso8601(String date)
  2. iso86012date(String s)
  3. iso8601ToCalendar(String s)
  4. iso8601ToDate(String s)
  5. ISO8601ToSeconds(String iso8601)
  6. isOneOf(String value, String... values)
  7. ISOToJulianDate(String dateObs)
  8. isValidISO8601(String time)
  9. normalizeToISO8601(String sDate, TimeZone tz)