IBM Support

Updates to base year support for 2-digit year date formats

News


Abstract

Changes related to the 1940-2039 date range used by 2-digit year date formats.

Content

The current supported date range for 2-digit year date formats is January 1, 1940 – December 31, 2039. When using a date format that only includes the last two digits of a year, the system assumes years 40 to 99 are 1940 - 1999, and years 00 to 39 are 2000 - 2039.

Support was added for a new base year in IBM i 7.5, which allows the user to change the base year to 1970, which would shift the date range out 30 years:  January 1, 1970 – December 31, 2069. 
The QIBM_QBASEYEAR environment variable can be used to set the base year to 1940 or 1970. When the environment variable is not present, the current default of 1940 will continue to be used as the base year in release 7.6. This base year is used by commands with a parameter of TYPE(*DATE) to determine the century when only the last two digits of the year are provided.
In IBM i 7.6, the Convert Date (CVTDAT) command now uses the QIBM_QBASEYEAR to determine the base year when converting to or from one of the date formats that only uses 2-digits for the year.
The QIBM_QBASEYEAR environment variable does not affect RPG, COBOL or database. Dates stored in databases or used by an application program should not rely on the operating system to determine the century. Applications should be updated to use a date format with a 3 or 4-digit year, such as *CYMD, *YYMD, *LONGJUL, etc. before the year 2040 to avoid wrapping back to 1940 (similar to the year 2000 problem).
Additional information about setting the QIBM_QBASEYEAR environment variable can be found in the the Work Management topic in the 7.6 version of IBM Documentation.
Also see the RPG topic for information on the DATEYY keyword that can be used to help application developers find where 2-digit year dates are being used in their programs. 

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHAAA2","label":"Operating System"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.6.0"}]

Document Information

Modified date:
08 April 2025

UID

ibm17229351