[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    DateTime format problem
From:       kris16 <krister.o.jonsson () tietoenator ! com>
Date:       2007-02-22 14:44:40
Message-ID: 9101164.post () talk ! nabble ! com
[Download RAW message or body]


Hi,
I am trying to set the date and time for the element CreationDateTime in an
Oagis document.
I want the date and time to look like this:
<ns:CreationDateTime>2007-02-22T15:30:06<ns:CreationDateTime>

When I print out the Calendar object using the toString() method I get the
result:
2007-02-22T15:30:06.270+01:00

When I try to set the elements value I get the result:
<ns:CreationDateTime>2007-02-22+01:00</ns:CreationDateTime>

Why is the time part missing ? 

Below is the code:


XmlDateTime xdt = XmlDateTime.Factory.newInstance(); 
xdt.set(Calendar.getInstance());
//Oagis Application Area code
ApplicationAreaDocument newShowApp =
ApplicationAreaDocument.Factory.newInstance();
ApplicationAreaType newShowAppType = newShowApp.addNewApplicationArea();
newShowAppType.setCreationDateTime(xdt.getCalendarValue());


/Regards Krister
-- 
View this message in context: http://www.nabble.com/DateTime-format-problem-tf3273158.html#a9101164
Sent from the Xml Beans - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic