|| apoc.number.format - APOC 核心文档 - Neo4j 文档

apoc.number.format

详情

语法

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

描述

使用给定的模式和语言格式化给定的 INTEGERFLOAT,以生成 STRING

参数

名称

类型

描述

number

任意类型

要格式化的数字。

pattern

字符串

用于格式化数字的模式。默认值为:``。

language

字符串

一个符合 ISO 标准的语言标签。默认值为:``。

返回值

字符串

使用示例

RETURN apoc.number.format(1234567.87)  as output;
结果
输出

"1,234,567.87"

RETURN apoc.number.format(12345, '#,##0.00;(#,##0.00)', 'it') AS output;
结果
输出

"12.345,00"

RETURN apoc.number.format('aaa')  as output;
结果
输出

NULL

© . This site is unofficial and not affiliated with Neo4j, Inc.