Here you can find the source of printDate(java.util.Date dt)
public static String printDate(java.util.Date dt)
//package com.java2s; //License from project: GNU General Public License import java.util.Calendar; import javax.xml.bind.DatatypeConverter; public class Main { public static String printDate(java.util.Date dt) { if (dt == null) { return null; }//from www .ja v a 2 s .com Calendar c = Calendar.getInstance(); c.setTime(dt); return DatatypeConverter.printDate(c); } }