Here you can find the source of toTimestamp(XMLGregorianCalendar xmlDate)
public static Timestamp toTimestamp(XMLGregorianCalendar xmlDate)
//package com.java2s; /******************************************************************************* * Copyright SemanticBits, Northwestern University and Akaza Research * /* w w w.j ava 2 s . c o m*/ * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/caaers/LICENSE.txt for details. ******************************************************************************/ import java.sql.Timestamp; import javax.xml.datatype.XMLGregorianCalendar; public class Main { public static Timestamp toTimestamp(XMLGregorianCalendar xmlDate) { if (xmlDate == null) return null; return new Timestamp(xmlDate.toGregorianCalendar().getTime().getTime()); } }