File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: bean:write format
It's not a secret anymore!