apoc.convert.toFloat

Function APOC Core

apoc.convert.toFloat(value) | tries it’s best to convert the value to a float

Signature

apoc.convert.toFloat(object :: ANY?) :: (FLOAT?)

Input parameters

Name Type Default

object

ANY?

null

Usage Examples

Convert string to float
return apoc.convert.toFloat("1.7") AS output;
Table 1. Results
Output

1.7

Convert integer to float
return apoc.convert.toFloat(1) AS output;
Table 2. Results
Output

1.0