From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If Year is over 2040, how to convert Date to Second?

I use Date/Time to Second to do some process of date. However, it is possible that year will over 2040 in my application and this function will return wrong information (1904). How do I convert year after 2040 to seconds for analysis or if there is other better way to do it.
Thanks,
0 Kudos
Message 1 of 2
(2,122 Views)
I do not think there is a straightforward answer yet. I saw some discussion of this a while back, but I do not recall where. Until 64 bit numbers become available most platforms, you will likely need to keep track of such dates yourself. You could make the seconds a cluster of two integers and test the year part of the date/time for values > 2040 (2039?) and put an appropriate number of seconds into the second integer. However, please check to make sure that Date/Time works properly with the future values.

Lynn
0 Kudos
Message 2 of 2
(2,086 Views)