INT

INT

Syntax 

INT(<numberstringBooleandate>)

Description

Rounds a number down to the nearest integer. INT accepts null values.

Converts integers contained in a string, Boolean values, or dates into the integer data field type. When using Boolean values, true is converted into 1, and false is converted into 0. Dates are converted into milliseconds (returning the difference between the current time and midnight, January 1, 1970 UTC).

Examples

Data field type

Column1

INT() returns

Data field type

Column1

INT() returns

float

4.7

4

float

-4.7

-5

string

55

55

string

55.2

<error>

Boolean

true

1

Boolean

false

0

date

Oct 15, 2010 04:34:34 AM

1,287,110,074,000

date

Sep 25, 2010 12:33:25 PM

1,285,410,805,000

big_integer

9,999,999,999,999,999,999

<error>