FormatNumber Procedure

  • 2 minutes to read

Codeunit CFL Functions

Formats a decimal number with specified minimum and maximum decimal places. Removes spaces from the formatted result.

Signature

FormatNumber(myNumber: Decimal; myMinDecimals: Integer; myMaxDecimals: Integer) : Text[30]

Parameters

myNumber Decimal

The decimal number to format.

myMinDecimals Integer

The minimum number of decimal places to display.

myMaxDecimals Integer

The maximum number of decimal places to display.

Returns

Text[30]

The formatted number as text, maximum 30 characters.