You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jean-Michel Robinet <jr...@silvernet.fr> on 2004/08/17 16:59:52 UTC
format date using a bean:write
Hello,
Is it possible to format a date stored in a Date object using a <bean:
write> tag?
I use the following but it's not working:
<bean:write name="product" property="creationDate"
format="##-##-####" />
Thanks in advance.
/jm
Re: format date using a bean:write
Posted by Erik Weber <er...@mindspring.com>.
See the API documentation for java.text.SimpleDateFormat (if I
understand your problem correctly).
Erik
Erik Weber wrote:
> <bean:write name="product" property="creationDate" format="MM/dd/yyyy"/>
>
> for example . . .
>
>
> Jean-Michel Robinet wrote:
>
>> Hello,
>>
>>
>>
>> Is it possible to format a date stored in a Date object using a <bean:
>> write> tag?
>>
>> I use the following but it's not working:
>>
>> <bean:write name="product" property="creationDate"
>> format="##-##-####" />
>>
>>
>>
>> Thanks in advance.
>>
>> /jm
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: format date using a bean:write
Posted by Erik Weber <er...@mindspring.com>.
<bean:write name="product" property="creationDate" format="MM/dd/yyyy"/>
for example . . .
Jean-Michel Robinet wrote:
>Hello,
>
>
>
>Is it possible to format a date stored in a Date object using a <bean:
>write> tag?
>
>I use the following but it's not working:
>
> <bean:write name="product" property="creationDate"
>format="##-##-####" />
>
>
>
>Thanks in advance.
>
>/jm
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: format date using a bean:write
Posted by Kris Schneider <kr...@dotech.com>.
See the JavaDoc for java.text.SimpleDateFormat. One possibility:
<bean:write name="product"
property="creationDate"
format="MM-dd-yyyy" />
Quoting Jean-Michel Robinet <jr...@silvernet.fr>:
> Hello,
>
>
>
> Is it possible to format a date stored in a Date object using a <bean:
> write> tag?
>
> I use the following but it's not working:
>
> <bean:write name="product" property="creationDate"
> format="##-##-####" />
>
>
>
> Thanks in advance.
>
> /jm
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org