toint
The toint
function converts the input to a value of type int
(long
).
Syntax
toint( Expression )
Arguments
- Expression: Expression to convert to a value of type
int
.
Returns
If the type conversion is successful, returns an int
value. Decimal places are truncated.
If the type conversion fails, returns null
.
Examples
toint(123)
returns123
toint("123.456")
returns123
toint("abc")
returnsnull