ICONV and OCONV Differences

The syntax for converting dates with ICONV is the same as for OCONV, except that:

n
Ignored. The input conversion accepts any number of year's digits regardless of the n specification. If no year exists in the input date, the routine uses the year part of the system date.
s
Ignored. The input conversion accepts any single nonnumeric, nonsystem-delimiter character separating the day, month, and year regardless of the s specification. If the date is input as a string of characters that are not delimited, it is interpreted as one of the following formats: [YY]YYMMDD or [YY]YYDDD.
subcodes
Ignored. The input conversion accepts any combination of upper- and lowercase letters in the month part of the date.

In IDEAL and INFORMATION flavor accounts, the input conversion of an improper date returns a valid internal date and a STATUS( ) value of 3. For example, 02/29/93 is interpreted as 03/01/93, and 09/31/93 is interpreted as 10/01/93. A status of 3 usually represents a common human error. More flagrant errors return an empty string and a STATUS( ) value of 1.

In PICK, REALITY, and IN2 flavor accounts, the input conversion of an improper date always returns an empty string and a status of 1.

If the data to be converted is the null value, a STATUS( ) value of 3 is set and no conversion occurs.

Example

The following example shows how to use the format modifiers:

D DMY[Z,A3,Z2]

Z modifies the day format option (D) by suppressing leading zeros (05 becomes 5). A3 modifies the month format option (M) so that the month is represented by the first three alphabetic characters (APRIL becomes APR). Z2 modifies the year format option (Y) by suppressing leading zeros and displaying two digits. This conversion converts April 5, 1993 to 5 APR 93.