apoc.number.format

Function

apoc.number.format(number ANY, pattern STRING, language STRING) - formats the given INTEGER or FLOAT using the given 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