You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Bingel, Michael" <Mi...@paybox.net> on 2003/05/13 09:08:54 UTC
[beanutils] How to convert from Date to (formatted) String ?
I have a problem copying Dates to my struts form bean
and displaying them, because they are always converted
to the extended format "Wed Jan 01 00:00:00 CET 2003",
which I can not parse as input.
Is it possible to create a DateToString Converter to
get a format like "yyyy-MM-dd HH:mm:ss" ?
Will the BeanUtils.copyProperties() use the converter ?
thanx Mike
Re: [beanutils] How to convert from Date to (formatted) String ?
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Tuesday, May 13, 2003, at 08:08 AM, Bingel, Michael wrote:
>
> I have a problem copying Dates to my struts form bean
> and displaying them, because they are always converted
> to the extended format "Wed Jan 01 00:00:00 CET 2003",
> which I can not parse as input.
>
> Is it possible to create a DateToString Converter to
> get a format like "yyyy-MM-dd HH:mm:ss" ?
yes.
> Will the BeanUtils.copyProperties() use the converter ?
so long as you register it, it will.
- robert