Previous Topic: NOWGMT Function--Return Current Time in Seconds

Next Topic: ORBITS Function--Perform a Bitwise OR Operation

NUMBER Function--Convert to a Numeric Value

The NUMBER function converts its argument to a numeric value. Strings are converted up to the first non-digit. Booleans that have a value of TRUE are converted to 1; otherwise, they are converted to zero.

Syntax

The NUMBER function has the following format:

NUMBER(source_string | bool_val)

Parameters

The NUMBER function accepts either of the following parameters:

source_string (string)

bool_val (Boolean)

Return Value

The NUMBER function returns a number.

Example

Return_value=NUMBER('juan')
Return_value=0

Return_value=NUMBER('45juan')
Return_value=45

Return_value=NUMBER(TRUE)
Return_value=1

More information:

BOOLEAN Function--Convert to "TRUE" or "FALSE"

STRING Function--Convert to a String


Copyright © 2010 CA. All rights reserved. Email CA about this topic