DECIMAL function
Text
The textual representation of the number.
Radix
The base (radix). If omitted, it is assumed to be 10.
Returns
The converted decimal number.
Converts a textual representation of a number in a given base to a decimal number. DECIMAL("F", 16)DECIMAL("F"; 16) returns 15, because F in hexadecimal (base 16) equals 15 in base 10.
Use the BASE function to convert a decimal number to another base. Also consider using the more specialized BIN2DEC, OCT2DEC and HEX2DEC functions.
Examples
Returns 15, because F in hexadecimal (base 16) equals 15 in base 10.
Returns 255, because F in hexadecimal (base 16) equals 255 in base 10.
Returns the array { 15, 255 }{ 15; 255 }, because F and FF in hexadecimal (base 16) equal 15 and 255 in base 10.
Returns the array { 5, 255 }{ 5; 255 }, because 101 in binary (base 2) equals 5 in base 10 and FF in hexadecimal (base 16) equal 15 in base 10.
Returns 45745, because ZAP in base 36 equals 45745 in base 10.