Why does Database Toolbox 5.0 (R2013b) return an incorrect date when working with Microsoft SQL Server?

2 views (last 30 days)
I am using the Microsoft SQL Server JDBC Driver 3.0 to connect to my Microsoft SQL Server 2008 (or newer). And I am running a query which should return columns with the DATE datatype. The returned dates are incorrect however; where in previous MATLAB versions I for example got back the correct 2013-06-26 I now receive 2013-06-24.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 May 2021
Edited: MathWorks Support Team on 25 May 2021
MATLAB 8.2 (R2013b) is the first MATLAB version to use Java Runtime Environment (JRE) 1.7 and there is an incompatibility between Microsoft SQL Server JDBC Driver version 3.0 and JRE version 1.7 which causes dates to be returned incorrectly:
To resolve this issue update your Microsoft SQL Server JDBC Driver to version 4.0 or newer:
Or apply the hotfix given on the webpage above.

More Answers (0)

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!