BASE

Converts a number into a text representation in another base.

Sample Usage

BASE(7,2,4)
BASE(200,16)

Syntax

BASE(value, base, [min_length])

  • value - The number that is to be converted.
  • base - The base to convert the number to.
  • min_length - [OPTIONAL] Minimum length of the string to be returned.

Examples

BASE(7,2,4) converts the decimal number 7 to base 2 (binary). The result is 0111. 
BASE(200,16) converts the decimal number 200 to base 16. The result is c8. 

Notes

  • The value should be an integer greater than or equal to zero.
  • The base should be an integer from 2 to 36.
  • Decimal inputs will be truncated.