ToNumber

The ToNumber() converts a value to a number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Note: this function uses the language setting of a portal when converting text.

Returns the number converted from text or a unit from date. Returns Invalid expression when text is not a number, or when reference is not a valid RowId, or when date is not a valid date value or unit is not a valid date unit.

Syntax

ToNumber(text)

ToNumber("1.34") => 1.34

ToNumber("a123b456") => Invalid expression

ToNumber(unknowntext) => unknown

ToNumber(reference)

ToNumber([reference-field to currentrow of a list]) => [the numeric ID value of the current row]

ToNumber(date, unit)

ToNumber(date(2015,9,26,15,46,29), day) => 269

ToNumber() => Invalid expression

Parameters

NameTypeRequiredDescription

text

text

a text containing a number.

reference

reference

reference field, holding a rowid of a list.

date

date

a date.

unit

text

the unit that is retrieved from date.

Last updated