LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subtract current time from time stamp constant

Solved!
Go to solution

I thought this would be easy. 

 

I expected "Subtracted Time" to display the difference between "Fixed Time" and "Current Time".

While it does count-down minutes and seconds as expected, the hours indicator is several hours off the expected value. 

 

The date on "Subtracted Time" is 1903, so it's counting from the zero time of the time stamp. 

So basically, how can I get the stamp to show hh:mm:ss.sss  ?

 

 

 

 

 

Here's some of the stuff I tried:

I tried 24 hour format. I tried most every button in properties. 

 

I tried to set the indicator "Subtracted Time" to Relative Time in properties. But I had two problems with setting that property. 

In "Default Editing Mode" the Absolute and Relative time selections are greyed out. So I couldn't change it, though Absolute time was both greyed out and highlighted blue. 

Then I switched to "Advanced Editing Mode", played with Relative, Absolute, and Numeric time format codes and all I seemed to be getting was a Red LED when I tried various combinations of "Insert into Format String". I had to revert 99% of the time. When I didn't "revert" it made no difference in the result. 

 

0 Kudos
Message 1 of 4
(4,371 Views)
Solution
Accepted by topic author Carmen92126

Don't use a timestamp indicator.  Use a regular numeric indidcator and set the display format to relative time.

0 Kudos
Message 2 of 4
(4,358 Views)

Thanks, RavensFan.

 

I thought for sure there was some property to click to properly format a time difference in Time Stamp.

 

 

 

 

 

 

 

0 Kudos
Message 3 of 4
(4,335 Views)

You'd think there should be a setting in a time stamp indicator.  And it teases you with the "relative time", but it being disabled.  It's the regular numeric indicator that gives you the power you want.

 

I think the key thing is the different between time as a difference that can be expressed in days, hours, minutes, and seconds, and time as it falls on a calendar where days turn into months and years, and the values are directly dependent on a calendar.  Once you add the calendar, it basically becomes an important apart of the time format.

 

 

Message 4 of 4
(4,322 Views)