• Post Reply Bookmark Topic Watch Topic
  • New Topic

dates with java

 
Daniel Conner
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using an Oracle 10g database. I need to be able to search for dates that are stored in the database. I created a java class that will do the searching.
My problem is that the dates in the database are stored like this "22-AUG-07"
Are there any java classes that put dates in this format? Or do I need to write a java class that will do it for me?
 
Jan Cumps
Bartender
Posts: 2620
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The database does not store your dates in the format 22-AUG-07, it just displays them that way in sql*plus.
Your dates are stored in DATE format. The corresponding java type is java.sql.date.

Regards, Jan
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!