commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jouni Aro <jouni....@prosys.fi>
Subject Betwixt: Converting dates into/from custom string format - how?
Date Mon, 04 Jun 2007 09:35:27 GMT
Hi,

I have been trying to figure out how to customize Betwixt to read and 
write dates in a custom format. It seems to read the value in correctly 
to a GregorianCalendar object, but then it outputs it as a struct.

In the XML, the date is and must be in the following sample format: 
'2007-05-03T14:42:50.834024Z'

I have tried to define a Date property and customize the conversion in
beanReader.getBindingConfiguration().setObjectStringConverter, but my 
skills do not seem to be enough for this.  Neither did I manage to read 
it into a GregorianCalendar, but write that in a single element.

The property in the object may be in any date type.

Any advise how this should be done?

BR,

Jouni Aro
Prosys


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message