Skip to main content
TO_INT
Tom Williams avatar
Written by Tom Williams
Updated over 10 months ago

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") returns 123

  • TO_INT("123") + 10 returns 133

  • TO_INT("1.8") returns 1

  • TO_INT(1.8) returns 1

  • TO_INT("not_a_number") returns 0

Did this answer your question?