aspose file tools*
The moose likes JSP and the fly likes change the date format from db to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "change the date format from db to jsp" Watch "change the date format from db to jsp" New topic
Author

change the date format from db to jsp

bakiyalakshmi dhanraj
Greenhorn

Joined: Nov 02, 2007
Posts: 24
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

Joined: Dec 19, 2004
Posts: 98
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


Regards,
Pankaj Patil
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: change the date format from db to jsp