Here you can find the source of formatXsdDate (final Date date)
public static String formatXsdDate (final Date date)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String formatXsdDate(final Date date) { return getXsdDateFormat().format(date); }/*w w w. j ava 2 s . com*/ private static SimpleDateFormat getXsdDateFormat() { // NB don't share instances - not threadsafe. return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); } }