apoc.number.format

Function APOC Core

apoc.number.format(number) | format a long or double using the default system pattern and language to produce a string

Signature

apoc.number.format(number :: ANY?, pattern =  :: STRING?, lang =  :: STRING?) :: (STRING?)

Input parameters

Name Type Default

number

ANY?

null

pattern

STRING?

lang

STRING?

Usage Examples

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

"1,234,567.87"

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

"12.345,00"

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

NULL