wood burning stoves 2.0*
The moose likes JDBC and the fly likes Date Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Date Problem" Watch "Date Problem" New topic
Author

Date Problem

Shunmu U
Greenhorn

Joined: Dec 19, 2003
Posts: 4
I am using Oracle as the DB. When I fetch any date column from a result set(using getDate() method), I get it displayed in YYYY-MM-DD format. I use the DD-MM-YYYY format to insert into the DB & the inserted date is displayed properly if a select query is done in SQL Plus.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

Take a look at the SimpleDateFormat class. You can display the date in any format you want when you get it back.


[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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Problem
 
Similar Threads
conversion of date
sql date convert
Date Formatting
Date Validation
date conversion