The moose likes Object Relational Mapping and the fly likes Setting Calendar date and time into XML with out time zone and milliseconds Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Setting Calendar date and time into XML with out time zone and milliseconds" Watch "Setting Calendar date and time into XML with out time zone and milliseconds" New topic
Author

Setting Calendar date and time into XML with out time zone and milliseconds

Nazmul Bhuiyan
Greenhorn

Joined: May 23, 2002
Posts: 17
My XML document passed XSD validation but fails loading into the other system that only accept date and time without milliseconds and time zone.

I've Calendar date and when I'm setting the date/time to XML document it is setting date as <date-created>2007-05-03+12:00</date-created> with the time zone and time as <time-created>10:00:00.000+12:00</time-created> with milliseconds and time zone. I know it is a valid date according to the W3C.
How do I set date without time zone i.e. <date-created>2007-05-03</date-created> and the time without the milliseconds and time zone i.e. <time-created>10:00:00</time-created> what I need to do?

I'm getting the Calendar date through hibernate and setting date and time though XMLBeans.
 
 
subject: Setting Calendar date and time into XML with out time zone and milliseconds
 
Threads others viewed
java.sql.ResultSet getTimestamp Locale issue
Time and Date class
Convert Local time to UTC and vice versa
Displaying date information in JTable
calendar to date and timezone
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com