08-02-2018 12:37 PM
Actually, the discrepancy lies with the fact that Excel thinks 1900 is a leap year. (!)
Excel '61' in date format is 3/1/1900 -> LabVIEW converts it to March 1 1900
Excel '60' in date format is 2/29/1900 -> LabVIEW converts it to Feb 28 1900
Excel '1' in date format is 1/1/1900 -> LabVIEW converts it to Dec 31 1899
I learned something today!
08-02-2018 01:15 PM
Yes it does!
I didn't reread this particular thread to verify the accuracy of what was posted. (I see that the poster was messing around with a "fudge factor" for some ridiculous reason.
There are other threads in the forum dealing with LabVIEW/Excel date/time conversions that are better. Here is one such message. https://forums.ni.com/t5/LabVIEW/Labview-Drivers-for-Wireless-Sensor-Networks/m-p/858261#M389006
08-02-2018 02:23 PM
There is also this to remember: (From a post on converting LabVIEW timestamp to Excel)
The OLE date format Excel uses is a double-precision floating point number that counts the time from 30 December 1899 00:00:00. Thus, a value of 0.0 corresponds to 30 December 1899 00:00:00.
The UTC date that is returned from the LabVIEW functions is the number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904. Thus, in this case, a value of 0.0 corresponds to 01 January 1904 00:00:00.
This means you have an offset between a LabVIEW timestamp and the OLE date.
Basically, whatever date you get from LabVIEW you need to add the number of seconds between 30 December 1899 00:00:00 and 01 January 1904 00:00:00 to get the corresponding OLE date value (in floating point).
http://forums.ni.com/t5/LabVIEW/UTC-time-to-OLE-date/td-p/729401?query.id=150077