DF - Date Format

With the DF session parameter, you determine the length of a date when converted into alphanumeric representation without an edit mask being specified.

Possible settings S 8-byte representation with 2-digit year component and delimiters (yy-mm-dd).

With DF=S, only 2 digits are provided for the year information; this means that if the date value contained the century, this information would be lost during the conversion.

I 8-byte representation with 4-digit year component and no delimiters (yyyymmdd). See Note.
L 10-byte representation with 4-digit year component and delimiters (yyyy-mm-dd). See Note.
Default setting S  
Applicable statements FORMAT  

INPUT
DISPLAY
WRITE
PRINT

Parameter may be specified at statement level and/or at element level.

MOVE
COMPRESS
STACK
RUN
FETCH

Parameter may be specified at element level.
Applicable command none

Notes:

  1. The DF parameter is evaluated at compilation time.
  2. The sequence of the day, month and year components and the delimiter characters used are determined by the profile parameter DTFORM.
  3. When the value of a date field is converted into alphanumeric format (for example, in a MOVE, DISPLAY, WRITE or INPUT statement) and no edit mask is specified for the conversion, the default date format as determined by the profile parameter DTFORM is used as edit mask.
  4. The same is true for the input validation of a date variable used in an INPUT statement: If no edit mask is specified, the input is validated according to the date format determined by the DTFORM parameter.
  5. By using DF=I or DF=L, you can gradually change your applications to use 4-digit year representations and at the same time continue to make use of the flexibility provided by the profile parameter DTFORM.
  6. See also Date Format for Alphanumeric Representation - DF Parameter in the Programming Guide.