Przejdź do głównej zawartości

ToNumber

Converts specified value to decimal number.

ToNumber("value");
  • value – (String) The value to be converted to decimal

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

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")