apoc.number.format

Details

Syntax

apoc.number.format(number [, pattern, language ])

Description

Formats the given INTEGER or FLOAT using the given pattern and language to produce a STRING.

Arguments

Name

Type

Description

number

ANY

The number to format.

pattern

STRING

The pattern to format the number in. The default is: ``.

language

STRING

An ISO-compliant language tag. The default is: ``.

Returns

STRING

Usage Examples

RETURN apoc.number.format(1234567.87)  as output;
Results
output

"1,234,567.87"

RETURN apoc.number.format(12345, '#,##0.00;(#,##0.00)', 'it') AS output;
Results
output

"12.345,00"

RETURN apoc.number.format('aaa')  as output;
Results
output

NULL