Java tutorial
//package com.java2s; import java.util.Date; import java.util.GregorianCalendar; import javax.xml.datatype.XMLGregorianCalendar; public class Main { /** * Transform an XMLGregorianCalendar value to a Date value * * @param xmlCal * @return <code>Date</code> */ public static Date gregorian2date(XMLGregorianCalendar xmlCal) { Date date = null; if (xmlCal != null) { GregorianCalendar c = xmlCal.toGregorianCalendar(); date = c.getTime(); } return date; } }