The external format for DT# fields and the valid range for entering dates depends on the input edit code you select for the field.
The external format for DT# fields for both input and output also depends on the setting of the Date Generation Validation (YDATGEN) and Date Format (YDATFMT) model values. It can be *MDY, *DMY, or *YMD. Note
Note: To enter, display, or print date fields with a four-digit-year external format, such as MM/DD/YYYY, you need to change the edit codes to either / or – .
The following table shows how the edit codes and the settings of the YDATGEN and YDATFMT model values affect the way that dates are displayed and printed.
Note: This table also applies to user-defined 8-digit date fields that have field type 'DT8'.
|
|
YDATFMT |
Input Edit Code |
Output Edit Codes |
Date Displayed or Printed As: |
|---|---|---|---|---|
|
*MDY |
— |
4 / – |
Y / – |
10/27/95 10/27/1995 10-27-1995 |
|
*DMY |
— |
4 / – |
Y / – |
27/10/95 27/10/1995 27-10-1995 |
|
*YMD |
— |
4 / – |
Y / – |
95/10/27 1995/10/27 1995-10-27 |
|
*VRY |
*MDY |
4 / – |
Y / – |
10/27/95 10/27/1995 10-27-1995 |
|
*VRY |
*DMY |
4 / – |
Y / – |
27/10/95 27/10/1995 27-10-1995 |
|
*VRY |
*YMD |
4 / – |
Y / – |
95/10/27 19/95/1027 (2) 19-95-1027 (2) |
Note: Due to limitations within DDS, you cannot produce this result at run time with YDATGEN set to *VRY and YDATFMT set to *YMD. To display or print digit years in *YMD format you need to set YDATGEN to *YMD.
|
Copyright © 2014 CA.
All rights reserved.
|
|