Here you can find the source of formatISODateTime(Date date)
Parameter | Description |
---|---|
date | to format |
public static final String formatISODateTime(Date date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { protected static final SimpleDateFormat ISO_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SZ"); /**//from w ww. j av a 2s.c o m * Format Date into ISO 8601 full datetime string. * * @param date to format * @return formatted string */ public static final String formatISODateTime(Date date) { if (date == null) return null; synchronized (ISO_DATE_FORMAT) { return ISO_DATE_FORMAT.format(date); } } }