Table of contents
TOC
Collapse the table of content
Expand the table of content

Number.ToText

Owen Duncan|Last Updated: 4/19/2018

About

Returns a text value from a number value.

Number.ToText(number as number, optional format as nullable text, optional culture as nullable text) as nullable text  

Arguments

ArgumentDescription
numberNumber value to convert to text.
optional formatAn optional text value used to format common numeric values.
optional cultureA text value corresponding to the culture values supported on your version of Windows, such as "en-US". If the culture is not specified, the current user culture is used. For a list of culture names, see National Language Support (NLS) API Reference.

Format Settings

SettingNameDescription
D or dDecimalFormats the result as integer digits with an optional negative sign. The precision setting controls the number of digits in the output.
E or eExponential

(scientific)
Exponential notation. The precision setting controls the maximum number of decimal digits (default is 6).
F or fFixed-pointIntegral and decimal digits with optional negative sign.
G or gGeneralMost compact form of either fixed-point or scientific.
N or nNumberIntegral and decimal digits, group separators, and a decimal separator with optional negative sign.
P or pPercentNumber multiplied by 100 and displayed with a percent symbol.
R or rRound-tripRound-trip an identical number. The precision setting is ignored.
X or xHexadecimalA hexadecimal text value.
Any other single characterUnknown

setting
Throws Expression.Error error

Examples

Number.ToText(10, "D", "") equals 10  

Number.ToText(10, "E", "") equals 1.000000E+001  

Number.ToText(10, "F", "") equals 10.00  

Number.ToText(10, "G", "") equals 10  

Number.ToText(10, "N", "") equals 10.00  

Number.ToText(.10, "P", "") equals 10.00%  
© 2018 Microsoft