apoc.number.parseInt

Function

apoc.number.parseInt(text String, pattern String, language String) - parses the given string using the given pattern and language to produce a long.

Signature

apoc.number.parseInt(text :: STRING?, pattern =  :: STRING?, lang =  :: STRING?) :: (INTEGER?)

Input parameters

Name Type Default

text

STRING?

null

pattern

STRING?

lang

STRING?

Usage Examples

RETURN apoc.number.parseInt('12,345') AS output;
Table 1. Results
output

12345

RETURN apoc.number.parseInt('12,345', '#,##0.00;(#,##0.00)') AS output;
Table 2. Results
output

12345

RETURN apoc.number.parseInt('12.345', '' ,'it') AS output;
Table 3. Results
output

12345