From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't set time control to relative time

Solved!
Go to solution

Hi all,

I'm pretty new to LabVIEW, and I'm trying to set a Time Stamp Control to relative time. I put the control on the form, then right click and choose Display format. I choose Date unused, then advanced editing. The control has a box with this in it:

 

%<%H:%M:%S>T

 

After I change the big T to a little t, the Valid indicator turns red. What am I doing wrong?

 

Thanks,
Simon

0 Kudos
Message 1 of 5
(5,152 Views)

Hi,

 

Normally you don't have to edit that string.  If you set it to date unused, and select at the bottom left "relative time", it should do what you intend to do 😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 5
(5,134 Views)
Solution
Accepted by topic author SimonGoodson

The timestamp control only allows absolute time formating. You'll have to use a normal numeric for relative time (which can also display absolute time but not vice versa).

Rolf Kalbermatter
My Blog
Message 3 of 5
(5,129 Views)

Got It! Thanks to both of you!

0 Kudos
Message 4 of 5
(5,110 Views)

You can use LabVIEW units to set the relative time to minutes, hours, days, etc... and add this to the timestamp.

 

See Jim Kring's blog entry for examples:

 

LabVIEW tip: easy relative timestamp calculations

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 5 of 5
(5,102 Views)