You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by dg69 <de...@bcbsok.com> on 2010/02/03 21:58:37 UTC

Date Conversion

when the XSD has a element of "date" type the java bean makes it of type
Calendar. Is there a way I can convert the date which gets serialized in the
XML file in the mmDDyyyy format instead of the default format of
yyyy-mm-dd-hh-mm....
-- 
View this message in context: http://old.nabble.com/Date-Conversion-tp27443267p27443267.html
Sent from the Xml Beans - Dev mailing list archive at Nabble.com.

Re: Date Conversion

Posted by Jacob Danner <ja...@gmail.com>.
The format of the date value is defined by the schema specification
(http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#date)

Changing the format would no longer meet the specification and would
cause validation failures later.
If you only need certain values, you can try using methods in XmlDate
or XmlCalendar or modify the schema type to something like gYearMonth
based on your requirements.

Also, this is more of a user question, so for more help and eyes
viewing it, please post to the user mailing list next time.
-jacobd

On Wed, Feb 3, 2010 at 12:58 PM, dg69 <de...@bcbsok.com> wrote:
> when the XSD has a element of "date" type the java bean makes it of type
> Calendar. Is there a way I can convert the date which gets serialized in the
> XML file in the mmDDyyyy format instead of the default format of
> yyyy-mm-dd-hh-mm....
> ________________________________
> View this message in context: Date Conversion
> 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