This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes bean:write  format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:write  format" Watch "bean:write  format" New topic

bean:write format

jaya repaka

Joined: Nov 06, 2003
Posts: 18
Hi All,
Has Anyone used the format attribute to format time?
In Jsp page
<bean:write property = "time" name = "List" format=""/>

I am able to display time as hh:mm:SS(13:30:45)
but I wanted to format as 13:30:45 PM or AM.

Please let me know how to format...

Thanks in advance.........

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Struts uses java.text.SimpleDateFormat for date and time formatting. Here is a link to the API documentation that explains the symbols.

Consultant, Sima Solutions
Don't get me started about those stupid light bulbs.
subject: bean:write format
Similar Threads
problem starting the tomcat4
all caught up on nitpicking
Time in 24 hrs or AM/PM
bean:write formatKey tag
<bean:write/> of struts1