This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Oracle Date to Java date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle Date to Java date" Watch "Oracle Date to Java date" New topic
Author

Oracle Date to Java date

Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
I call a stored procedure with returns set of date. I need to format these dates in 'dd-MMM-yyyy' format and display. How I can do it in simple way.

I tried to use the SimpleDateFormat but it takes java.util.date and not java.sql.Date as parameter.

Please let me know
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Purushothaman,
java.sql.Date is a subclass of java.util.Date so you can still use it.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: Oracle Date to Java date
 
Similar Threads
Problem in SimpleDateFormat
painful java.util.Date bug
String conversion
<bean:write/> of struts1
Java Date formatting doubt