LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subtracting a time stamp from another time stamp...

hi...

take a look at the attached VI.

should give me only 0,006 sec or 0,007 sec

but gives me 1hr 0min 0,006 sec...how?
0 Kudos
Message 1 of 7
(3,205 Views)

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

 

Message 2 of 7
(3,201 Views)
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...
0 Kudos
Message 3 of 7
(3,172 Views)
Interestingly enough, on my system I get something completely different:


Amusing.


Message Edited by smercurio_fc on 08-06-2008 10:58 AM
0 Kudos
Message 4 of 7
(3,147 Views)
I think you sent a negative number to the timestamp indicator? Some combination of the difference, daylight savings time and time zones.

Lynn
0 Kudos
Message 5 of 7
(3,136 Views)
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.

___________________
Try to take over the world!
Message 6 of 7
(3,131 Views)

@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.
0 Kudos
Message 7 of 7
(3,115 Views)