Number.ToText
Number.ToText(number as nullable number, optional format as nullable text, optional culture as nullable text) as nullable text
Converts the numeric value number
to a text value according to the format specified by format
.
The format is a text value indicating how the number should be converted. For more details on the supported format values, go to Standard numeric format strings and Custom numeric format strings.
An optional culture
may also be provided (for example, "en-US") to control the culture-dependent behavior of format
.
Convert a number to text without specifying a format.
Usage
Number.ToText(4)
Output
"4"
Convert a number to exponential format.
Usage
Number.ToText(4, "e")
Output
"4.000000e+000"
Convert a number to percentage format with only one decimal place.
Usage
Number.ToText(-0.1234, "P1")
Output
"-12.3 %"