System.Format(Any [, Integer] [, Integer]) Method

Version: Available or changed with runtime version 1.0.

Formats a value into a string.

Syntax

String :=   System.Format(Value: Any [, Length: Integer] [, FormatNumber: Integer])

Note

This method can be invoked without specifying the data type name.

Parameters

Value
 Type: Any
This is an AL variable (expression) of any simple data type, such as Option, Integer, BigInteger, Decimal, Char, Text, Code, Date, Time, DateTime, Boolean, or GUID. If, when the system formats Value, the result is a value larger than the maximum length MAXSTRLEN method (Code, Text) of String, a run-time error occurs.

[Optional] Length
 Type: Integer
This optional parameter specifies the length of String.

[Optional] FormatNumber
 Type: Integer
This optional parameter specifies the format that you want to use.

Return Value

String
 Type: Text

Remarks

For more information about FormatNumber, see Formatting Values, Dates, and Time).

See Also

System Data Type
Get Started with AL
Developing Extensions