Function: TO_INT
Syntax: TO_INT(value)
Description: Cast a value as an integer. For floats, it returns the integer part of the value (equivalent to a ROUNDDOWN
). Return 0
if the value is not a number.
Sample usage:
TO_INT("123")
returns123
TO_INT("123") + 10
returns133
TO_INT("1.8")
returns1
TO_INT(1.8)
returns1
TO_INT("not_a_number")
returns0