ATODBL: Converting an Alphanumeric String to Double-Precision Format

How to:

The ATODBL function converts a number in alphanumeric format to decimal (double-precision) format.


Top of page

x
Syntax: How to Convert an Alphanumeric String to Double-Precision Format
ATODBL(source_string, length, output)

where:

source_string
Alphanumeric

Is the string consisting of digits and, optionally, one sign and one decimal point to be converted.

length
Alphanumeric

Is the length of the source string in bytes. This can be a numeric constant, or a field or variable that contains the value. If you specify a numeric constant, enclose it in single quotation marks, for example '12'.

output
Double precision floating-point


Example: Converting an Alphanumeric Field to Double-Precision Format

ATODBL converts EMP_ID into double-precision format.

ATODBL(EMP_ID, '09', 'D12.2')

For 112847612, the result is 112,847,612.00.

For 117593129, the result is 117,593,129.00.


iWay Software