Hello,
when I'll create a XML-document with JAXP, then the Jax-Parser format any date, that I'll use, in the Format
yyyy-mm-ddTimezone (for Example: 2008-01-09+01:00), when I'm using this function:
protected XMLGregorianCalendar getDate(java.util.Date date) {
try {
if (date == null) return null ;
GregorianCalendar cal = new GregorianCalendar() ;
cal.setTime(date) ;
return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal) ;
} catch (DatatypeConfigurationException e) {
throw new java.lang.Error(e);
}
}
but the format of the date should be like YYY-MM-DD without any information about the timezone (and without timestamp).
I'm using JAXP, so I think, i can't use the "normally" Class java.util.Date with the "normaly" formats?
Can anybody tell, how to format the date without the timezone?
Thanks
Jens Hirsch
Edited by: JonnyD. on 10.07.2008 11:06