WordNum

Returns the English text equivalent of a given number.

Syntax

WordNum( n1 [, n2 [, k ]])

Parameters

Parameter

Description

n1

The number to convert.

If any of the following statements is true, the function returns * (asterisk) characters to indicate an error:

  • n1 is not a number.

  • The integral value of n1 is negative.

  • The integral value of n1 is greater than 922,337,203,685,477,550.

n2 (Optional)

A number identifying the formatting option. Valid numbers are:

  • 0 (default value): The number is converted into text representing the simple number.

  • 1: The number is converted into text representing the monetary value with no fractional digits.

  • 2: The number is converted into text representing the monetary value with fractional digits.

If you do not include a value for n2 , the function uses the default value ( 0 ).

k (Optional)

A string representing a valid locale. If you do not include a value for k , the function uses the ambient locale.

See Locales .

As of this release, it is not possible to specify a locale identifier other than English for this function.

Examples

The following expressions are examples that use the WordNum function.

Expression

Returns

WordNum(123.45)

One Hundred and Twenty-three Dollars

WordNum(123.45, 1)

One Hundred and Twenty-three Dollars

WordNum(1154.67, 2)

One Thousand One Hundred Fifty-four Dollars And Sixty-seven Cents

WordNum(43, 2)

Forty-three Dollars And Zero Cents

WordNum(Amount[0], 2)

This example uses the first occurrence of Amount as the conversion number.

// Ethnio survey code removed