apoc.number.parseFloat

Details

Syntax

apoc.number.parseFloat(text [, pattern, language ])

Description

Parses the given STRING using the given pattern and language to produce a FLOAT.

Arguments

Name

Type

Description

text

STRING

The string to parse a float from.

pattern

STRING

The pattern the given string is in. The default is: ``.

language

STRING

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

Returns

FLOAT

Usage Examples

RETURN apoc.number.parseFloat('12,345.67') AS output;
Results
output

12345.67

RETURN apoc.number.parseFloat('12.345,67', '', 'it') AS output;
Results
output

12345.67