apoc.convert.toInteger

Function APOC Core

apoc.convert.toInteger(value) | tries it’s best to convert the value to an integer

Signature

apoc.convert.toInteger(object :: ANY?) :: (INTEGER?)

Input parameters

Name Type Default

object

ANY?

null

Usage Examples

Convert string to integer
return apoc.convert.toInteger("1") AS output;
Table 1. Results
Output

1

Convert float to integer
return apoc.convert.toInteger(1.2) AS output;
Table 2. Results
Output

1