Function toInteger()
converts a number or the nubmer part of a string starting from the first character into int64 and returns this integer value. It returns 0 if the first character of the string is not a digit, returns UUID if NDOE or EDGE is passed in, or returns null
if other types are passed in.
Arguments:
- Value <number | string | text | bool>
Returns:
- Integer <int64>
Comman Usage
Example: Convert -3456.7 to integer
return toInteger(-3456.7)
-3456
Example: Convert '2023-03-02' to integer
return toInteger("2023-03-02")
2023
Analysis: When "2023-03-02" is passed in as a temporal type, for example a datetime property of a node, the system will return null
.