05-19-2009 12:10 PM
Solved! Go to Solution.
05-19-2009 12:20 PM - edited 05-19-2009 12:21 PM
Use the numeric conversion functions to make it a U32. Since it will now be an integer, the fractional part of the seconds will disappear, but I assume you don't care about that since you are asking for an integer.
05-19-2009 12:21 PM - edited 05-19-2009 12:23 PM
Hi Steve,
you could convert to an U32 like shown in the attachment...
You can't use I32 as timestamp is out of range already. But you could make your own timestamp, for instance as "second since 1.1.1980" when you want to use I32...
@ravens fan:
In LV7.1 you can't convert a timestamp directly to U32 - one more reason to upgrade
05-21-2009 08:16 AM
The timestamp is a signed 128 bit fixed point number. The decimal point is in the center. You can typecast it to a cluster of two 64 bit integers or four 32 bit integers in any version of LabVIEW it is supported. The first element will be the high bits. Current timestamps are on the order of 3 X 109. This puts them out of the range of I32s and barely in the range of U32s.
I will second Gerd's suggestion to create your own epoch. You can do this easily by simply subtracting the timestamp of your epoch from the original timestamp. If your version of LabVIEW does not natively support subtraction of timestamps, check out <vi.lib>\Waveform\TSOps.llb. It contains some timestamp utilities which may be of use. They also demonstrate the typecast to a cluster method of manipulating timestamps.