Changes to the 1940 – 2039 date range for date formats with a 2-digit year

The current supported date range for converting or verifying 2-digit year date formats is January 1, 1940 to December 31, 2039. For example, when using a date with only 2 digits to specify the year (for example, *MDY, *DMY, or *YMD), years in the range of 40 to 99 are assumed to be 1940-1999 and years 00 to 39 are assumed to be 2000 to 2039.

On IBM i 7.5, support has been added for a new base year of 1970 which spans 100 years, with a date range of January 1, 1970 – December 31, 2069.

A new environment variable QIBM_QBASEYEAR, can be used to set the base year to either 1970 or 1940. If the environment variable is not present, the default base year will remain as 1940 in IBM i 7.5.

Commands that have a parameter of TYPE(*DATE) will use the base year specified in the QIBM_QBASEYEAR environment variable.

The default base year will change to 1970 in a future release. This support is being made available now so that you can begin preparing for this change. Applications that still use 2-digit date formats may need to change to use a date format that includes the century.

The environment variable can be set at the system level, or at the job level.

Note: This environment variable update only effects commands with a parameter of TYPE(*DATE). Existing RPG or COBOL programs as well as Db2 are not effected by this update. Dates need to be converted to a 4-digit-year value.

To set the base year to 1970 for all jobs in the system:


Note: Only jobs started after the environment variable is added will have the environment variable set – use WRKENVVAR or DSPJOB, opt 22 to see if the environment variable is set for a job.

To set the base year to 1970 in your own job:


The base year is set when the job is started and cached in the job, therefore you must call the following command to update the cached base-year after adding or changing the job-level environment variable (Change the date format to the same date format currently used by your job):