Java tutorial
//package com.java2s; /******************************************************************************* * Copyright SemanticBits, Northwestern University and Akaza Research * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/caaers/LICENSE.txt for details. ******************************************************************************/ import java.util.Date; import javax.xml.datatype.XMLGregorianCalendar; public class Main { public static Date toDate(XMLGregorianCalendar xmlDate) { if (xmlDate == null) return null; return xmlDate.toGregorianCalendar().getTime(); } }