Rodolfo
Rodolfo

Reputation: 23

Resultset getDate() returned incorrect date value

This error happen in my application when I try run the following:

SELECT send_day FROM types WHERE ID_TYPE = 4

The query execution returned that date with 2 days before of column value.

The recovering of this value in Java app is this:

java.sql.Date dataSQL = retorno.getDate(1);

I'm using SQLJDB4.0 driver and database version is 2008.

Some answers for post comments:

The value of database is 2013-08-22 and the return is 2013-08-20

My timezone is UTC-03:00 . In the database, I exec the following command:

select SYSDATETIMEOFFSET() which return: 2013-08-22 11:49:12.4010367 -03:00

Upvotes: 1

Views: 1484

Answers (1)

Rodolfo
Rodolfo

Reputation: 23

I updated the SQLJDBC for 4-4.0 version and the problem has been resolved.

Upvotes: 1

Related Questions