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: 

Zero padded numeric format

Solved!
Go to solution

I am trying to format a floating point number to a zero padded string.

 

19.1 =>   0019.1

-19.3 =>   -019.3

 

Neither the Format Value or the Number to Fractional String seem to let me get to the zero padded string I need.

Suggestions?

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

Number to Fractional String has a Width input. Set this however you would like and then use Search and Replace String function to replace all spaces with zeroes. If there's a negative number, you'll have to move it to the front after the string conversion.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 3
(3,213 Views)
Solution
Accepted by topic author SunshineDesign

Format into String with the right format string code.

 

Message 3 of 3
(3,207 Views)