toInteger toInteger

Converts an argument value to an integer.

Category

Conversion

Function syntax

toInteger(<parameter>)

Parameters

Parameter
Description
string
converts the string value as an integer
dateTime
converts the date as the number of milliseconds (epoch milliseconds)
decimal
converts into integer by removing the decimal part (example: 1.5 becomes 1)
boolean
converts the boolean value as 1 if true, 0 if false

Signatures and returned type

toInteger(<dateTime>)

toInteger(<decimal>)

toInteger(<integer>)

toInteger(<string>)

toInteger(<boolean>)

Return an integer.

Examples

toInteger("4")

Returns 4.

recommendation-more-help
4f4a00c1-77c9-4eee-84df-bbe6206c3ab9