Java Utililty Methods XML Date Create

List of utility methods to do XML Date Create

Description

The list of methods to do XML Date Create are organized into topic(s).

Method

TimestampxmlGregorianCalendarToTimestamp(XMLGregorianCalendar xgc)
xml Gregorian Calendar To Timestamp
if (xgc == null)
    return null;
GregorianCalendar gc = xgc.toGregorianCalendar();
return new Timestamp(gc.getTimeInMillis());
StringxmlGregorianToString(XMLGregorianCalendar timestamp)
xml Gregorian To String
if (timestamp == null) {
    return null;
} else {
    return dateToString(timestamp.toGregorianCalendar().getTime());
StringxmlToDate(XMLGregorianCalendar calendar, DateFormat format)
if(null == calendar) return ""; if(null == format) default use format_yyyyMMdd_HHmmss
if (null == calendar) {
    return "";
if (null == format) {
    format = format_yyyyMMdd_HHmmss;
return Format(format, calendar.toGregorianCalendar().getTime());
DateTimexmlToDateTime(final XMLGregorianCalendar xmlCal)
xml To Date Time
DateTime result = null;
if (xmlCal != null) {
    int hourOfDay = xmlCal.getHour();
    int minuteOfHour = xmlCal.getMinute();
    int secondOfMinute = xmlCal.getSecond();
    int milliOfSecond = xmlCal.getMillisecond();
    if (hourOfDay < 0) {
        hourOfDay = 0;
...