Skip to content

FormatInteger - Built-in Formatting Function

Purpose

Formats an integer using the Windows locale settings or supplied mask.

Syntax

FormatInteger(exp,type[,mask])

Arguments

Argument Required Description
exp Yes The integer to be formatted
type Yes The format type from one of the predefined integer formats
mask No A string with the integer mask to use

Example

// format the date using the Windows locale settings
Return FormatInteger({Order.OrderID},drWindowsInteger)

Notes

  • When exp cannot be converted to an integer, a runtime error (Invalid parameter value) is generated. The range is: -2,147,483,648 through 2,147,483,647.
  • When type cannot be converted to an integer, a runtime error (Invalid parameter value) is generated. The range is an integer (-2,147,483,648 through 2,147,483,647), but it should be one of the predefined integer formats.
  • When mask cannot be converted to a string, a runtime error (Invalid parameter value) is generated.