ToNumber
Converts a boolean or text value to a numeric.
Variants
ToNumber(Boolean boolean)
Returns 0 if the boolean value is false, and 1 if the boolean value is true.
Parameters
- boolean
- The boolean value you want to convert.
Returns
Numeric
Examples
ToNumber(true)returns 1.ToNumber(false)returns 0.
ToNumber(Text text)
Returns the numeric value represented by the text.
Parameters
- text
- The text value you want to convert.
Returns
Numeric
Examples
ToNumber("123.56")returns the numeric value 123.56.
ToNumber(Text text, Text culture)
Returns the numeric value represented by the text in the specified culture.
Parameters
- text
- The text value you want to convert.
- culture
- The culture name from the list of valid culture identifiers.
Returns
Numeric
Examples
ToNumber("345,98", "de-DE")returns the numeric value 345.98.