tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felipe Leme" <t5jtjj...@sneakemail.com>
Subject Re: fmt:formatDate problems jstl 1.0.3
Date Wed, 03 Sep 2003 12:24:07 GMT
On Wednesday 03 September 2003 06:14 am, Tony Grant tony-at-tgds.net |jakarta| 
wrote:
> Now I have located the root of my problem. My query is returning a
> string and not a date...

If the query is returning a string, you could convert it to a date first -  
using parseNumber - and then format it in the proper locale:

<%  String sDate  = oeuvre_data; // simplified expression %>
<fmt:parseNumber var="date" parseLocale="en_US"><%=sDate%></fmt:parseNumber>
<fmt:formatNumber value="${date}"/>

If the locale is not en_US you can replace it or even use the pattern 
attribute.

Felipe


Mime
View raw message