Dates
The system determines how a date is formatted in a flat file when you run the Outbound Flat File Conversion program through a combination of the date-format user preference and the default value for century change year (CENTCHG in UDC 00/DF). When the date-format user preference is MDY (month, day, year), YMD (year, month, day), or DMY (day, month, year), the Outbound Flat File Conversion program uses the default value for CENTCHG to determine whether the year (Y) portion of a date is four digits or two digits. If the year being processed by the Outbound Flat File Conversion program is less than or equal to the CENTCHG default value, the system converts the year in the flat file to two digits. If the year being processed by the Outbound Flat File Conversion program is greater than the CENTCHG default value, the system converts the year in the flat file to four digits.
For example, if the default value for the CENTCHG item is 15 and the date-format user preference is MDY, the system uses this formatting in the Outbound Flat File Conversion:
Date to Be Formatted |
Typical Interface Table Format (Julian Dates) |
Converted Value in Flat File |
---|---|---|
May 14, 1998 |
98134 |
05/14/98 |
December 12, 2014 |
114346 |
12/12/14 |
December 12, 2015 |
115346 |
12/12/15 |
December 12, 2016 |
116347 |
12/12/2016 |
Blank Date |
0 |
00/00/00 |
You can also set the year portion of the date so that it is always produced as four digits in the flat file when you run the Flat File Conversion program. To set the year portion, follow these steps:
Set up a custom date format in UDC table 00/DF as MDE (month, day, four-digit year).
This is a predefined date format that the Outbound Flat File Conversion program uses to display the date as four digits. The order of the date in the custom date format can be changed to produce the desired date-format output, such as DME (day, month, year), EMD (year, month, day), and so on.
Assign this custom date format to the date-format user preference.
For example, if you set the date formatting so that the output always appears as four digits, the system formats the date as indicated in this table after you run the Outbound Flat File Conversion program:
Date to be Formatted
Typical Interface Table Format (Julian Dates)
Converted Value in Flat File
May 14, 1998
98134
05/14/1998
December 12, 1998
98346
12/12/1998
December 12, 2015
115346
12/12/2015
December 12, 2016
116347
12/12/2016
Blank Date
0
00/00/0000