Wednesday, September 18, 2013

java.util.Date to XMLGregorianCalendar

GregorianCalendar gregCal = new GregorianCalendar();
gregCal.setTime(myDate);
XMLGregorianCalendar date2 =  
            DatatypeFactory.newInstance().newXMLGregorianCalendar(gregCal);

No comments:

Post a Comment