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,233 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,226 Views)
Solution
Accepted by topic author SunshineDesign

Format into String with the right format string code.

 

Message 3 of 3
(3,220 Views)