ToNumber

Converts specified value to decimal number.

Syntax

ToNumber("value");

Function arguments

  • value – (String) The value to be converted to decimal

Return value

This function returns Decimal.
Returns value converted to decimal type. If conversion was not possible, error is thrown.

Examples

Example 1:
This will convert text value '213′ to a decimal number value.

numVal = ToNumber("213");

Example 2:
This will throw an error since 'abc’ has no decimal representation and cannot be converted to decimal number.

numVal = ToNumber("abc")
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.