Here you can find the source of formatXSDateTime(long lastModified)
public static String formatXSDateTime(long lastModified)
//package com.java2s; //The contents of this file are subject to the "Simplified BSD License" (the "License"); import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String sXSDT_FORMAT_STR = "yyyy-MM-dd'T'HH:mm:ss"; public static String formatXSDateTime(Date date) { // YYYY-MM-DDThh:mm:ss return (new SimpleDateFormat(sXSDT_FORMAT_STR)).format(date); }// ww w. ja va 2 s . c o m public static String formatXSDateTime(long lastModified) { Date date = new Date(lastModified); return formatXSDateTime(date); } }