Number function

The Number function changes the datatype of the parameter to number.

Parameter: datatype

Any number, string, date, time, or boolean value. This can come from a source node, the result of a function, or a value you specify.

Returns: number

The numeric value of the parameter or NaN (not a number). The conversion rules depend on the datatype of the parameter:

For number datatypes:
  • NaN for NaN, positive infinity or negative infinity
  • The same number for any other value
For string, any date, or any time datatypes:
  • The corresponding number if the string is in any of these formats, where n represents any set of digits:

    n or -n

    n. or -n.

    n.n or -n.n

    .n or -.n

    NaN for any other value

For the boolean datatype:
  • ‘true' evaluates to 1
  • ‘false' evaluates to 0



Feedback | Notices


Timestamp icon Last updated: Wednesday, February 17, 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/ref_Number.html