apoc.number.exact.toInteger

Function

apoc.number.exact.toInteger(string String, precision Integer, roundingMode String) - returns the integer value of the given large number (using Java BigDecimal).

Signature

apoc.number.exact.toInteger(stringA :: STRING?, precision = 0 :: INTEGER?, roundingMode = HALF_UP :: STRING?) :: (INTEGER?)

Input parameters

Name Type Default

stringA

STRING?

null

precision

INTEGER?

0

roundingMode

STRING?

HALF_UP

Usage Examples

RETURN apoc.number.exact.toInteger('504238974', 5, 'HALF_DOWN') as output;
Table 1. Results
output

504238974