Skip to main content

Hi there,

I want to convert an attribute so it always has four digits, and two decimal places. As an example, if I have . 6.5 as the source, I want the output as 06.50.

I've used the expression 04.2f in a string formatter, but this doesn't seem to be working for all of my attributes

As an example if my source attribute is 50.7, it recognizes the format and the output is 50.70. But if I have an attribute with one single digit before the decimal place like 7.28 the output is still 7.28 and not 07.28

Let me know if you can help.

-Reid

Oops I figured it out! The proper input for the String Formatter is 05.2f as the decimal point is being used as a part of the string. 5 is the width and 2 is the precision.


Reply