Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

time formatting on JSP

 
Julie Fellenz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a data bean, I'm getting a string which contains the time a record was inserted into our Oracle database, withn the format "hh:mm:ss". I want the value to display in the "h:mm a" format on my JSP. What can I do?
Thanks,
Julie (a real greenhorn)
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look at java.text.SimpleDateFormat (API docs)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic