Java XML Date to convertToDate(XMLGregorianCalendar date)

Here you can find the source of convertToDate(XMLGregorianCalendar date)

Description

Convert a XMLGregorianCalendar to a Date .

License

Open Source License

Parameter

Parameter Description
date the date to convert

Return

the converted date

Declaration

public static Date convertToDate(XMLGregorianCalendar date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Date;

import javax.xml.datatype.XMLGregorianCalendar;

public class Main {
    /**//  w w w.j  a v  a  2  s . c  o m
     * Convert a {@link XMLGregorianCalendar} to a {@link Date}.
     * 
     * @param date
     *          the date to convert
     * @return the converted date
     */
    public static Date convertToDate(XMLGregorianCalendar date) {
        return date.toGregorianCalendar().getTime();
    }
}

Related

  1. calendarAsDate(XMLGregorianCalendar xgc)
  2. calendarAsString(XMLGregorianCalendar xgc)
  3. convertirXMLGregorianCalendarToDate(XMLGregorianCalendar fecha)
  4. convertSFTimeToDateTime(XMLGregorianCalendar soapTime)
  5. convertToDate( final List dates)
  6. convertToDateTime(XMLGregorianCalendar calendar)
  7. convertToLocalTime(XMLGregorianCalendar calendar)
  8. convertXmlDateToDate(XMLGregorianCalendar date)
  9. convertXmlGregCalToDate(XMLGregorianCalendar xmlCal)