This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

db date value problam

 
raj baig
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am using mysql db.i have stored the date in mysql table using
now().it stored as : 2006-09-18 11:38:03

But when i retrieved that value using jdbc in my application it is adding zero at the end. like : 2006-09-18 11:38:03:0

can all guess why it is happening like this.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raj,
It is giving you the value to second precision. You can use SimpleDateFormat to format it without the milliseconds.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic