Subtracting a time stamp from another time stamp...

Subtracting a time stamp from another time stamp...

Post by Share_Goo » Thu, 07 Aug 2008 17:40:05


hi... take a look at the attached VI.should give me only 0,006 sec or 0,007 secbut gives me 1hr 0min 0,006 sec...how?


T1-T2_LV8.2.1.vi:
http://www.yqcomputer.com/
 
 
 

Subtracting a time stamp from another time stamp...

Post by devchande » Thu, 07 Aug 2008 17:40:06

If u observe the output of subtraction function, it will show '0.0069999' or 6-7 milliseconds as the difference ( which is what you expect)
But then, you are converting that into timestamp which is the time-zone-independent number of seconds that have elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time.
Hence the incorrect result
 

 
 
 

Subtracting a time stamp from another time stamp...

Post by Share_Goo » Thu, 07 Aug 2008 21:10:10

Hi Dev... thanks a lot...i did realize that the difference is correct in terms of float.but i was unaware that the time stamp is time-zone-independant.i tried by changing the timezone...it worked perfect...now it is clear to me... thanks...
 
 
 

Subtracting a time stamp from another time stamp...

Post by smercurio_ » Fri, 08 Aug 2008 01:10:13

Interestingly enough, on my system I get something completely different:<img src=" http://www.yqcomputer.com/ "> Amusing.Message Edited by smercurio_fc on 08-06-2008 10:58 AM


T1-T2_LV8.2.1_FP.png:
http://www.yqcomputer.com/
 
 
 

Subtracting a time stamp from another time stamp...

Post by johnsol » Fri, 08 Aug 2008 02:10:07

I think you sent a negative number to the timestamp indicator? Some combination of the difference, daylight savings time and time zones. Lynn
 
 
 

Subtracting a time stamp from another time stamp...

Post by tst » Fri, 08 Aug 2008 02:10:09

If you want to see the relative time, you need to create a DBL indicator after the substraction, right click it, select Display Format... and change the format to relative time.
 
 
 

Subtracting a time stamp from another time stamp...

Post by smercurio_ » Fri, 08 Aug 2008 03:10:05