ToInteger
ToInteger( value )
ToInteger( value )
to_integer( value )
ToInteger( value )
Description
The ToInteger
function converts a value to a numeric integer, if
possible.
Attempting to convert a value to a number which has no numeric representation results in an "invalid argument" error.
Parameters
Parameter | Type | Definition and Requirements |
---|---|---|
|
Any |
The value to attempt to convert to an Integer. |
Examples
The following query uses ToInteger
multiple times to demonstrate how
the function converts various kinds of value
s into integers:
[1234 1234 123]
[ 1234, 1234, 123 ]
[1234, 1234, 123]
[ 1234, 1234, 123 ]
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!