Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference TOBASETEN
Functions and Expressions Reference Guide
207
TOBASETEN
The TOBASETEN function converts a text item that can be interpreted as a
number, using positional notation of the base specified, to a base 10 number.
Syntax
TOBASETEN ( single-text-expression , single-integer-
expression )
Meaning
TOBASETEN ( text_to_convert , base_to_convert_from )
Returns
This function returns a single-integer.
Returns a number that results from converting text_to_convert that can be
interpreted as a number, using positional notation of the base specified by
base_to_convert_from, to its base 10 representation. Text item characters A-Z
are interpreted as digits having decimal values from 10-35, respectively.
If base_to_convert_from is less than 2 or greater than 36,
TOBASETEN
evaluates to NONE. If text_to_convert contains a character that is not
alphanumeric or is not in the range specified by base_to_convert_from,
TOBASETEN returns NONE.
Examples
TOBASETEN ( "A" , 16 ) returns the value 10
TOBASETEN ( "10" , 36 ) returns the value 36
TOBASETEN ( "A0" , 15 ) returns the value 150
TOBASETEN ( "A0" , 5 ) returns the value NONE
Uses
Use
TOBASETEN to convert a number from another base to base 10.
Related Function
FROMBASETEN