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_format)

where:

source_string

Alphanumeric

Is the string consisting of digits and, optionally, 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'. The length can be from 1 to 15 characters.

output_format

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