ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to get rid of leading zeros on graph axis?

Solved!
Go to solution

Is there any way to format the x-axis of a graph to get rid of leading zero's? This is what I have:

 

adekruif_0-1613233364090.png

And this is what I would like it to look like:

adekruif_1-1613250158752.png

 

Currently the formatting is <%I %p>t. Is there a way to get rid of that leading zero with formatting, or am I going to have to do this another way?

0 Kudos
Message 1 of 3
(2,030 Views)
Solution
Accepted by topic author adekruif

Yes, this is possible using the time format strings. I couldn't find it stated in the LabVIEW help (Fundamentals >> VI and Function Reference >> Programming VIs and Functions >> String Functions >> Format Codes for the Time Format String), but this reference says that placing a # symbol before the relevant specifier will omit leading zeroes, i.e. %#I.

 

Note that the lower-case t at the end of your specifier indicates relative time. I don't believe you can use %I in this mode.

Message 2 of 3
(1,997 Views)

Awesome, thank you so much! I searched through the LabVIEW help, but wasn't able to find it (Not sure why it isn't there as well.  And you are correct, small t doesn't work with relative time. I was playing around with relative/absolute and the small t was a left over.

0 Kudos
Message 3 of 3
(1,951 Views)