Guys, I think I discovered an incredible bug.
I want to convert a numeric value rappresenting the number of days from 1-gen-1900 in a smalldatetime.
I do this:
select cast(0 as smalldatetime)
select cast(37386 as smalldatetime)
I get:
1900-01-01 00:00:00
2002-05-12 00:00:00
If you do the same kind of operation from ANY software (ie: Excel or Access), you instead get the right values:
1900-01-00 00:00:00
2002-05-10 00:00:00
How is it possible that the SQL conversion start from the wrong value (1900-01-01 instead of 1900-01-00) and ends loosing 1 day?????
It seems that Bill Gates striked back...
I will be very grate with everyone will give me his opinion about it
I want to convert a numeric value rappresenting the number of days from 1-gen-1900 in a smalldatetime.
I do this:
select cast(0 as smalldatetime)
select cast(37386 as smalldatetime)
I get:
1900-01-01 00:00:00
2002-05-12 00:00:00
If you do the same kind of operation from ANY software (ie: Excel or Access), you instead get the right values:
1900-01-00 00:00:00
2002-05-10 00:00:00
How is it possible that the SQL conversion start from the wrong value (1900-01-01 instead of 1900-01-00) and ends loosing 1 day?????
It seems that Bill Gates striked back...
I will be very grate with everyone will give me his opinion about it