PARSEINTEGER
Returns the integer value of the object passed to the function.
Syntax
= PARSEINTEGER(value)
Parameters
Value |
A number whose integer value is to be determined. The number can be specified as an integer (e.g., 37), a decimal value (e.g., 37.48), as a string, or as the value of a variable (e.g, UnitPrice). |
Return Type
Long
Examples
Example |
Returns |
= PARSEINTEGER(-3.5) |
-4 |
= PARSEINTEGER(“3.5”) |
4 |
= PARSEINTEGER(“$1,234”) |
1234 |
= PARSEINTEGER(“$-1,234.57”) |
-1234 |
= PARSEINTEGER(“200%”) |
2 |
= PARSEINTEGER(UnitPrice) |
The integer value of the UnitPrice variable |
= PARSEINTEGER(“abcd”) |
Displays message “ERROR: Input string was not in a correct format” |