apoc.number.exact.toInteger

Details

Syntax

apoc.number.exact.toInteger(string [, precision, roundingMode ])

Description

Returns the INTEGER of the given large number (using Java BigDecimal).

Arguments

Name

Type

Description

string

STRING

A large number represented as a string.

precision

INTEGER

The rounding precision. The default is: 0.

roundingMode

STRING

A precision rounding mode (UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN). The default is: HALF_UP.

Returns

INTEGER

Usage Examples

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

504238974