Kbase P100229: How to force a 4-digit year using the EXPORT statement?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/20/2009 |
|
Status: Verified
GOAL:
How to force a 4-digit year using the EXPORT statement?
GOAL:
How to export a date using 4 digits for the year
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
FIX:
The EXPORT statement will default to a 2-digit year for date fields, even though it is formatted for 4-digits in the Data Dictionary. To force a 4-digit year to EXPORT, set the SESSION:YEAR-OFFSET equal to a high enough number; such as 3000; to make all dates to fall outside the 100-year window governing the Progress default century for 2-digit dates, and force the 4-digit year.
Setting the YEAR-OFFSET at the outset of the program changes that value for the procedure only. To change the value for running multiple procedures, set the value using the -yy startup parameter instead.
Beginning in 9.0A, a new startup parameter was created: -yr4def. The -yr4def parameter forces the Data Dictionary to dump date fields with a year format of four digits as opposed to two. This startup parameter also affects the 4GL functions MESSAGE, EXPORT, and PUT UNFORMATTED.