tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerome Jacobsen" <>
Subject RE: DateTime
Date Tue, 21 Jan 2003 20:09:20 GMT
I think this should work:

<dt:format pattern="E, MMMM dd, yyyy"><bean:write name="deltaItem"

Hopefully the above formatted properly in your mail reader.  Anyway I think
your problem is that there is whitespace surrounding your long time value
and it gets passed to the dt:format tag handler.  I think the tag should
handle this gracefully, but it doesn't in my version at least.

You might try this if using Struts 1.1b2 or greater.

<bean:write format="E, MMMM dd, yyyy" name="deltaItem"

I haven't tried it yet.  Note that the ".time" is removed from property.

Another option is that if you use a JSP 1.2 container you can use JSTL.

<fmt:formatDate value='${deltaItem.newValueTs}' pattern='E, MMMM dd, yyyy'/>

Hope one of these works for you.


> -----Original Message-----
> From: Cohan, Sean []
> Sent: Tuesday, January 21, 2003 2:49 PM
> To: 'Tag Libraries Users List'
> Subject: DateTime
> I'm trying to pass a to the DateTime format tag
> using a Struts bean tag, but keep getting an 'Invalid Date' message
> displayed on my page.  I know the data is a valid date.  Not sure if I'm
> doing something wrong with the tag though.  Any ideas?  Here's
> how I'm using
> it.
> <dt:format pattern="E, MMMM dd, yyyy">
>    <bean:write name="deltaItem" property="newValueTs.time" />
> </dt:format>
> This will call the getTime() method on the returned by the
> getNewValueTs() method of the deltaItem bean.
> I also get an 'Invalid Date' message if I change getNewValueTs() to return
> the value of getTime() for the deltaItem object.
> --
> To unsubscribe, e-mail:
> <>
> For additional commands, e-mail:
> <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message