ToBoolean
Converts a numeric or text value to a boolean.
Variants
ToBoolean(Numeric number)
Returns true if the number is a non-zero value; otherwise, returns false.
Parameters
- number
- The numeric value you want to convert.
Returns
Boolean
Examples
ToBoolean(1)
returns true.ToBoolean(0)
returns false.
ToBoolean(Text text)
Converts the values "1", "true", or "yes" to true; other values are converted to false. Case is ignored.
Parameters
- text
- The text value you want to convert.
Returns
Boolean
Examples
ToBoolean("1")
returns true.ToBoolean("YES")
returns true.ToBoolean("text")
returns false.