This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:write format

 
jaya repaka
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.........

Thanks
jai
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts uses java.text.SimpleDateFormat for date and time formatting. Here is a link to the API documentation that explains the symbols.

http://java.sun.com/j2se/1.4.2/docs/api/index.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic