Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.GregorianCalendar; import javax.xml.datatype.XMLGregorianCalendar; public class Main { /** * Convert date from XML GregorianCalendar to String in 'MM/dd/yyyy hh:mm:ss' * * @param xmlCalendar * @return String */ public static String XMLGregorianCalendartoString(XMLGregorianCalendar xmlCalendar) { GregorianCalendar calendar = xmlCalendar.toGregorianCalendar(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss"); return simpleDateFormat.format(calendar.getTime()); } }