Java XML Date to convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar)

Here you can find the source of convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar)

Description

method to convert from Date to XMLGregorianCalendar

License

Open Source License

Parameter

Parameter Description
xmlGregorianCalendar to be converted

Return

Date converted representation

Declaration

public static Date convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar) 

Method Source Code

//package com.java2s;

import java.util.Date;

import javax.xml.datatype.XMLGregorianCalendar;

public class Main {
    /**//w ww.  j a  v a2 s.c o m
     * method to convert from Date to XMLGregorianCalendar
     * 
     * @param xmlGregorianCalendar
     *            to be converted
     * @return Date converted representation
     */
    public static Date convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar) {
        return xmlGregorianCalendar == null ? null : xmlGregorianCalendar.toGregorianCalendar().getTime();
    }
}

Related

  1. convertToLocalTime(XMLGregorianCalendar calendar)
  2. convertXmlDateToDate(XMLGregorianCalendar date)
  3. convertXmlGregCalToDate(XMLGregorianCalendar xmlCal)
  4. convertXMLGregorianCalendarToDate(final XMLGregorianCalendar calendar)
  5. convertXMLGregorianCalendarToDate(XMLGregorianCalendar xmlGregorianCalendar)
  6. ConvertXMLGregorianCalenderToString(XMLGregorianCalendar Calendar, String Format)
  7. getDate(XMLGregorianCalendar calendar)
  8. getDate(XMLGregorianCalendar calendar)
  9. GetDateDiffInDays(XMLGregorianCalendar Calendar)