LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format Date/Time String

The LabVIEW timestamp is always in UTC (provided the clock and timezone are set correctly). So use that whenever possible and only convert to string format when you absolutely have to. This includes the timestamp display which does internally have to do a string conversion to display the information in user understandable form.

 

I'm sure nobody would be happy to have to guess that 0x00000000DBADBF7E 0x8497F80000000000 is the current date and time, with the first 64-bit value being the whole seconds since January 1, 1904 GMT and the second being the fractional seconds. So when having to display a timestamp to users (or storing it to a string form somewhere) we do have to do some conversion but it may be a good solution to actually keep it in UTC even then, depending on the intended end user audience.

 

If it doesn't have to be in text form, keep it as binary timestamp as much as possible and only worry about the correct conversion when needing to display it.

Rolf Kalbermatter
My Blog
Message 11 of 12
(312 Views)

I have set the timezone in RT target as UTC. The acquired data is post processed by phyton, so when the TDMS file is openned in python the values concur which is what I want.(But even now if the file is accesed through Diadem the time value and converted string value differ apart by one hour ).

0 Kudos
Message 12 of 12
(277 Views)