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
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply 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: 56151
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: change the date format from db to jsp
 
Similar Threads
Date Time Format
Changing eclipse variables
How to check a date is within range of dates ?
Time Zone problem
Convert String to sql.Date