Table of Contents

AsNumber(expression)

Category: Special function


Description

This function converts expression to a number.


Use cases

This is useful when you wish to validate the contents of a field or retrieve the number value of a field.


Arguments

ArgumentTypeDescription
expressionNumber, Text, BooleanThe value or result of an expression to be converted into a number value.

Return value type: Number


Remarks


Examples

asnumber( '123.45' )  //Returns 123.45
asnumber( 543.21 )  //Returns 543.21
asnumber( 1 > 2 )  //Returns 0  (FALSE result of an expression.)
asnumber( 'text' )  //Returns '#Can't convert to number'


See also