Skip to main content
Version: 8.3

numberFormat

This function is used by Ignition's Expression language.

Description​

Returns a string version of the number argument, formatted as specified by the pattern string. This is commonly used to specify the number of decimal places to display, but can be used for more advanced formatting as well.

Syntax​

numberFormat(number, pattern)

Parameters​

TypeParameterDescription
FloatnumberThe number to format.
StringpatternThe format pattern. Refer to the Number Format Reference page for more information about pattern strings.

Results​

String - The string representation of the number formatted according to the pattern provided.

Examples​

Code Snippet
numberFormat(34.8, "#0.00'%'") //returns the string "34.80%"