• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Server 2008 date problem

 
Amit Sonewane
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using sql server 2008, while retrieving date column from resultset, if we do rs.getDate(), it is returning date instance, but if we do rs.getObject(), it is returning String.....
Any suggestions what to do...
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amit Sonewane wrote:Hi,

I am using sql server 2008, while retrieving date column from resultset, if we do rs.getDate(), it is returning date instance, but if we do rs.getObject(), it is returning String.....
Any suggestions what to do...

How you so sure that it is returning String, and not an Object ? As long as, you are getting valid date, no problem !!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What driver are you using? Can you post your code?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic