aspose file tools*
The moose likes JDBC and the fly likes SQL Server 2008 date problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL Server 2008 date problem" Watch "SQL Server 2008 date problem" New topic
Author

SQL Server 2008 date problem

Amit Sonewane
Greenhorn

Joined: Sep 08, 2006
Posts: 6
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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 !!


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

What driver are you using? Can you post your code?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL Server 2008 date problem