Here you can find the source of parseDateValue(String value)
public static Date parseDateValue(String value)
//package com.java2s; /**// w w w .j a va2s . c om * Logspace * Copyright (c) 2015 Indoqa Software Design und Beratung GmbH. All rights reserved. * This program and the accompanying materials are made available under the terms of * the Eclipse Public License Version 1.0, which accompanies this distribution and * is available at http://www.eclipse.org/legal/epl-v10.html. */ import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private static final String ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; private static final String TIMEZONE_UTC = "UTC"; public static Date parseDateValue(String value) { try { return getTimeFormat().parse(value); } catch (ParseException e) { throw new IllegalArgumentException("Expected date field of format '" + ISO_8601_DATE_FORMAT + "', but found value '" + value + "'.", e); } } private static DateFormat getTimeFormat() { DateFormat df = new SimpleDateFormat(ISO_8601_DATE_FORMAT); df.setTimeZone(TimeZone.getTimeZone(TIMEZONE_UTC)); return df; } }