Here you can find the source of dateTimeToXSDateTime(Date date)
Parameter | Description |
---|---|
date | the date |
protected static String dateTimeToXSDateTime(Date date)
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/* w w w. j av a 2 s .c om*/ * * Dates the DateTime into an XML schema date time. * * @param date * the date * @return String representation of DateTime. */ protected static String dateTimeToXSDateTime(Date date) { String format = "yyyy-MM-dd'T'HH:mm:ss'Z'"; DateFormat utcFormatter = new SimpleDateFormat(format); return utcFormatter.format(date); } }