Function Number2Round23

Outputs a number with 2 or 3 decimal places depending on number.

Number2Round23([VALUE],[USECOMMAS])

Parameters

#TypePassingDefaultNameDescription/Comments
1decimalrequiredn/aVALUEThe value to format
2booleanoptional.F.USECOMMASUses 1,000 comma separator

Returns

The formatted value as a string


Examples

Number2Round23(AGENCYF1P,.F.)

If AGENCYF1P = 10.00, then 10.00 is output
If AGENCYF1P = 10.10, then 10.10 is output
If AGENCYF1P = 10.99, then 10.99 is output
If AGENCYF1P = 10.125, then 10.125 is output
If AGENCYF1P = 10.001, then 10.001 is output
If AGENCYF1P = 10.100, then 10.10 is output