On 9/25/2017 8:23 AM, Stephan Buchert wrote:
I was just going to write that you can easily convert an MS serial date
value stored in Sqlite to a date string (using 40777 as example):

sqlite> select date('1899-12-31', 40777||' days');
2011-08-23

However, according to

https://support.office.com/en-us/article/DATEVALUE-function-df8b07d4-7761-4a93-bc33-b7471bbff252

the answer should be 2011-08-22.

1900 was not a leap year, 2000 was, can it be, that the MS Excel software
has this wrong?

Yes, it's a famous Excel date bug, originally introduced in Lotus 1-2-3 and 
ported into Excel for compatibility:

http://support.microsoft.com/kb/214326

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to