Parameter List
Syntax
DECIMAL(text, radix)
text
The text string representing the number in the given base. For example: '1010'
, '1A'
, 'Z'
.
radix
The base of the number system. An integer between 2 and 36. For example: 2
for binary, 16
for hexadecimal.
More details
DECIMAL interprets a text string as a number in the specified base and converts it to decimal. The text must only use digits valid for the given base (for example, base 2 accepts only 0 and 1, base 16 accepts 0–9 and A–F). The base must be an integer between 2 and 36. If text contains invalid characters for the base, DECIMAL returns an error.