Skip to Content.
Sympa Menu

freetds - Reading DateTime in MSSQL (6.5) - BUG?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: joel_trunick AT dell.com
  • To: freetds
  • Subject: Reading DateTime in MSSQL (6.5) - BUG?
  • Date: Wed, 21 Apr 1999 11:28:40



When reading dates in MSSQL, I consistently get a time 5 hours earlier than
what is in the database. Is the code wrong, or is this a bug?

-------------------

String sql = new String("Select max(ModTime) from FileJournal");

try {
Connection conn = Connect.getConnection();
Statement stmt = conn.createStatement();

ResultSet rs = stmt.executeQuery( sql );

if ( rs.next() )
ts = rs.getTimestamp(1); //"ModTime"
System.out.println( ts ); //5 hours less than ISQL!
...






Archive powered by MHonArc 2.6.24.

Top of Page