• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

change the date format from db to jsp

 
bakiyalakshmi dhanraj
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
In database i have date format in 19/03/2008 while i retrive the value in jsp, i need 19 march 2008 in this format.. can anyone tel me.
 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

its possibble in 2 ways
1) by converting the date in the db query itself by using to_date
2) by using simpleDateFormat in java
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are retrieving the date as a Date instance (rather than a string), you can simple use the <fmt:formatDate> JSTL tag on the JSP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic