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:
Any other non-numeric characters are invalid, and EDIT returns a value of zero.
EDIT(fieldname)
where
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.
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 |