A1ex Posted June 29, 2006 Report Share Posted June 29, 2006 Hey guys, what is the easy way to compute the difference between two date/time stamps in days/hours/minutes/seconds. I am using LV7. Quote Link to comment
Yair Posted June 29, 2006 Report Share Posted June 29, 2006 The timestamp is essentially the number of seconds since January 1904 in DBL representation, so you can substract one timestamp from the other and then divide the result by 86400, 3600 or 60 to get what you want. Quote Link to comment
A1ex Posted June 30, 2006 Author Report Share Posted June 30, 2006 The timestamp is essentially the number of seconds since January 1904 in DBL representation, so you can substract one timestamp from the other and then divide the result by 86400, 3600 or 60 to get what you want. And what would be the way of dealing with timestamp in text format? Quote Link to comment
AnalogKid2DigitalMan Posted June 30, 2006 Report Share Posted June 30, 2006 Format string to number Quote Link to comment
Yair Posted June 30, 2006 Report Share Posted June 30, 2006 And what would be the way of dealing with timestamp in text format? If you mean that your timestamps are in strings, then you will need to convert them to LV timestamps by breaking the strings into their different parts, converting those parts to numbers, wiring those numbers into a date/time cluster and converting that cluster to a timestamp. The basic VIs can be found in the Time & Dialog palette. A nice example of how this can be done can be found here. Quote Link to comment
A1ex Posted June 30, 2006 Author Report Share Posted June 30, 2006 Thank you, guys. I figured it out and appreciate your fast responce very much. Quote Link to comment
LAVA 1.0 Content Posted July 1, 2006 Report Share Posted July 1, 2006 I assume you already figured how to convert strings into LV timestamps. When you have LV timestamps, then it's quite easy to compute the timedifference in the format you wanted. See the image below. Quote Link to comment
A1ex Posted May 4, 2007 Author Report Share Posted May 4, 2007 QUOTE(jimi @ Jul 1 2006, 12:31 PM) I assume you already figured how to convert strings into LV timestamps. When you have LV timestamps, then it's quite easy to compute the timedifference in the format you wanted. See the image below.http://forums.lavag.org/index.php?act=attach&type=post&id=3072''>http://forums.lavag.org/index.php?act=attach&type=post&id=3072'>http://forums.lavag.org/index.php?act=attach&type=post&id=3072 Thank you, Tommi. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.