EDIT: Converting the Format of a Field

How to:

The EDIT function converts an alphanumeric field that contains numeric characters to a numeric value or a numeric field to a character string.

This function for manipulating a field in an expression that uses an operation which requires operands in a particular format.

When EDIT output is assigned to a new field, the format of the latter must correspond to the format of the returned value. For example, if EDIT converts a numeric field to a character string, you must give the new field an alphanumeric format.

EDIT deals with symbols of the source value in the following ways:


Top of page

x
Syntax: How to Convert the Format of a Field
EDIT(fieldname)

where

fieldname

Alphanumeric or Numeric

Is the field name.

Note: EDIT can also be used for extracting and adding characters from the source_string after converting a numeric field name. For details, see EDIT: Extracting or Adding Characters.



Example: Converting From Numeric to Alphanumeric Format

EDIT converts HIRE_DATE (a legacy date format) to alphanumeric format.

EDIT(HIRE_DATE)

For 82/04/01, the result it APRIL 01 1982.

For 81/11/02, the result it NOVEMBER 02 1981.


iWay Software