LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format pad with 0s bug?

Solved!
Go to solution

I'm trying to format a number to come out as xxx.xx.  For example, 5.32 would come out as 005.32.  I thought this was as simple as using the format specifier %03.2f in the format into string function, but this doesn't seem to work with LabVIEW 8.6.1.  I don't have older versions installed but I thought his used to do the trick.

 

Is this a bug, or am I just confused?

0 Kudos
Message 1 of 3
(2,362 Views)

Are you connecting like this?

anyway, its in version 8.6

 

 

Message Edited by Parny on 03-03-2009 06:20 PM
0 Kudos
Message 2 of 3
(2,355 Views)
Solution
Accepted by topic author mikema111

Parny wrote:

Are you connecting like this?

anyway, its in version 8.6


That won't work.  If he had 999.11 it would show up as 00999.11  Not what he wants.

 

Mike, try format specifier of %06.2f.  That is a precision of 2 and a minimum field width of 6 (2 for the decimal part, 1 for the decimal point, leaves 3 for the integer part of the number)

0 Kudos
Message 3 of 3
(2,345 Views)