I have a table that contains FLOAT field from datetime. When I convert this values to datetime, there is a two days difference between converted date with correct date. For example:
But in this site date convert is correct!!!
In this post, explains why this happens, but what is the solution in SQL Server?
>Solution :
You need to construct the datetime value from the correct "zero" date:
SELECT DATEADD(day, 45099, CONVERT(date, '18991230'))
Your current statement uses implicit data type conversion and adds number of days to the default datetime value 1900-01-01.

