This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Problem

 
Shunmu U
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34389
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the SimpleDateFormat class. You can display the date in any format you want when you get it back.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic