Result of JDBC query of date type column decrements days by 2

解决方案在MSDN的blog  传送门

Dear SQL Server developers and users:

Thank you for your ongoing support of the Microsoft JDBC Driver for SQL Server.  Some of you reported problems with dates when using JRE 1.7.

The Microsoft JDBC Driver for SQL Server currently supports JRE 1.5 & JRE 1.6, however we have made modifications to return correct date values regardless of the JRE version. This modification is available in the production version of the Microsoft JDBC Driver 4.0 for SQL Server.  The Microsoft JDBC Driver 4.0 for SQL Server
is supported on JRE 1.5 and JRE 1.6, and support for JRE 1.7 is on our roadmap.
In addition, the driver modification is also available for SQL Server 2000 customers as a hotfix in the 3.0 version of our driver. Please review the hotfix article to determine if the fix is applicable to you and if so, click the link to download the hotfix (applicable for all platforms).

As always we are interested in your feedback. You may report bugs and issues via our forums. If you encounter Java bugs you may report those to Java.

Thank you,
Shamitha Reddy
Program Manager Microsoft JDBC Driver for SQL Server


JDBC 4的下载地址 传送门

欢迎大佬支持本博客的发展 -- Donate --



  1. 谢谢博主分享啦

  2. 哈哈,我也曾发现过~

  3. 厉害,博主也将这个bug找出来,并处理了,不错!


  4. 顶 谢谢博主分享

  5. 顶一下 谢谢博主分享

  6. 数据库的,感觉蛮难搞得懂。

  1. 没有通告