struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Dunn" <greg.d...@mo.nisc.cc>
Subject Formatting dates in <html:text>
Date Wed, 26 Mar 2003 16:51:51 GMT
I'm trying to display a date in a particular format in an <html-el:text>
box.  I'm filling my form bean from my DAO which returns a timestamp, and

<html-el:text size="10" property="presReadingDate"
value="${meterReading.dtPresReadDt}"/>

displays the long date/time format 'Tue Mar 26 10:45:59 CST 2003' which is
no good.

I was looking at a discussion on this topic in the archives, but it appears
that it was left as "food for thought"

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg52386.html

I use the JSTL <fmt:formatDate> tag to display a date outside a form, but it
can't be nested so it's no good here.

This scenario seems like it would be fairly common.  What does one do here?
Format the date in a get/set pair in their bean and display that?  Use basic
HTML <input type="text"> tags?  What's best practice?

Thanks,


Greg


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


Mime
View raw message