Here you can find the source of getAsDateTime(String dateTime)
public static Date getAsDateTime(String dateTime)
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; public static Date getAsDateTime(String dateTime) { try {//from w ww. j a v a 2 s. com return new SimpleDateFormat(FORMAT).parse(dateTime); } catch (ParseException e) { throw new IllegalArgumentException(e); } } }