Converts dates between internal and external format.
p is the special processing operator. Can be any one of the following:
n is a number from 0 to 4 that specifies the how many digits to use for the year field. If omitted, the year will have four-digits. If n is 0, the year will be suppressed.
s is a non-numeric character to be used as a separator between month, date, and year. Must not be one of the special processing operators.
Dates are stored internally as integers which represent the number of days (plus or minus) from the base date of December 31, 1967. For example:
If you do not specify a special processing operator (see later) or an output separator, the default output format is two-digit day, a space, a three-character month, a space, and a four-digit year. If you specify just an output separator, the date format defaults either to the US numeric format "mm/dd/yyyy" or to the international numeric format "dd/mm/yyyy" (where / is the separator). You can change the numeric format for the duration of a logon session with the DATE-FORMAT command.
Field 8 codes are valid but, generally, it is easier to specify the D code in field 7 for input conversion. Dates in output format are difficult to use in selection processing.
If you are going to use selection processing and you want to use a code which reduces the date to one of its parts, such as DD (day of month), the D code must be specified in field 8.
Field 7 input and output conversions are both valid.
Generally, for selection processing, you should specify D codes in field 7. An exception is when you use a formatting code, such as DM, that reduces the date to one of its parts.
If no year is specified in the sentence, the system assumes the current year on input conversion. If only the last two digits of the year are specified, the system assumes the following years: