08-19-2021 01:33 PM
I have the following input string:
2021.08.01 - 23.10.14 Dispense.tdms
I added the date format to the file name so that the files sort and save in a orderly fashion that is not modified by saving the file and other changes:
YYYY.MM.DD - HH.MM.SS
Now I am trying to convert the string back to a date and use them in Excel. For some reason it looks like the conversion from timestamp to dbl is getting rounded off or something.
Converting the input string "2021.08.02 - 23.15.16 Dispense.tdms" to a LabVIEW timestamp yields the correct LabVIEW time. When the LabVIEW timestamp gets converted using DBL I get a number that looks like it is getting rounded off or something.
Playing with the conversion a bit more it seems that if I convert midnight on 8/2/2021 then I get 3710730000.
If I convert midnight on 8/3/2021 I get 3710810000.
So then if I convert 1 second after midnight on 8/3/2021 I get the same result as midnight - 3710810000.
Why?
Solved! Go to Solution.
08-19-2021 01:47 PM - edited 08-19-2021 02:12 PM
What you are seeing is LabVIEW rounding the number to fit the display properties you set or let default. (doubles default to 6 significant digits)
BTW: LabVIEW uses the full precision of the number internally for all mathematics, but rounds the display to match the format set. That's why your math comes out correct.