Format Numeric Value 2 Decimal Places
Hello,
I have a Formula Text that calculates and displays data based on the numbers users enter in two other numeric fields. Example: When a user enters a number in my Numerator and Denominator fields, my formula field divides those numbers and then displays the answer in the Percentage field (as shown in the screenshot below).
Is there a way to format the answer to two (2) decimal places, so it's shown as something like 7.33 and not 7.3333333 ? Please let me know.
See the code I used for my formula field below:
var Number Numerator = [Numerator] ;
var Number Denominator = [Denominator] ;
ToText(($Numerator / $Denominator) & " %")
Try the Round function:
ToText(Round($Numerator/$Denominator,0.01) & " %")The 0.01 tells Quickbase to round to two decimal places.