Here you can find the source of parseIsoDateTime(final String isoDateString, final String dateFormat)
public static Date parseIsoDateTime(final String isoDateString, final String dateFormat)
//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; } }