wood burning stoves 2.0
The moose likes JDBC and Relational Databases 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 Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle Date to Java date" Watch "Oracle Date to Java date" New topic

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
author & internet detective

Joined: May 26, 2003
Posts: 31571

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

[OCA 8 book] [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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Oracle Date to Java date