Discussion:
Subtracting a time stamp from another time stamp...
(too old to reply)
Share_Good
2008-08-06 08:40:05 UTC
Permalink
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://forums.ni.com/attachments/ni/170/346974/1/T1-T2_LV8.2.1.vi
devchander
2008-08-06 08:40:06 UTC
Permalink
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
 
Share_Good
2008-08-06 12:10:10 UTC
Permalink
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...
smercurio_fc
2008-08-06 16:10:13 UTC
Permalink
Interestingly enough, on my system I get something completely different:<img src="Loading Image..."> Amusing.Message Edited by smercurio_fc on 08-06-2008 10:58 AM


T1-T2_LV8.2.1_FP.png:
http://forums.ni.com/attachments/ni/170/347149/1/T1-T2_LV8.2.1_FP.png
johnsold
2008-08-06 17:10:07 UTC
Permalink
I think you sent a negative number to the timestamp indicator? Some combination of the difference, daylight savings time and time zones. Lynn
tst
2008-08-06 17:10:09 UTC
Permalink
If you want to see the relative time, you need to create a DBL&nbsp;indicator after the substraction, right click it, select Display Format... and change the format to relative time.
smercurio_fc
2008-08-06 18:10:05 UTC
Permalink
johnsold wrote:I think you sent a negative number to the timestamp indicator? Some combination of the difference, daylight savings time and time zones.To be honest, I didn't investigate it. I was just curious to see what would happen, and I just left it at that.
Loading...