SwRI BAR.gif (804 bytes)

Computers at the turn of the century

Like so many folks did back in the 1980s, Father Time leaped on the computer bandwagon and purchased a PC to streamline his business operations. So far it's been a great system -- he's been able to close out the old years and ring in the new ones without any downtime. However, he recently discovered that the turn of the century could spell trouble for many PC owners. Apparently some computers are not programmed to accept years that end in double zero. He's a couple of years ahead of the game, but no one knows better than he how time flies. While he prepares for the arrival of 1997, let's get an SwRI Whizard to help him with this problem.


"Father Time's problem is not whether his PC will allow a year of '00,' but how old he will be in the year 2000 and beyond when his computer does the math. In the year 2000, a typical computer will subtract his birth year from the current year. Let's see: 00 - 44 = ? Okay, he wasn't born in 1944, but I was, and sometimes I am like Father Time, at least according to my kids. Anyway, in 1999, I'll be 55. In 2000, am I 44 (which is fine by me) or 56? Most software would give 44 as the result.

"The basic problem for computer software written prior to 1990 is the year portion of any date field was captured and stored in the computer as a two-digit number, 01 to 99. If, instead, the year portion had been stored as a four-digit number, all would be right in the world today, except I would still be 56 in the year 2000. However, the problem is not just associated with your age or mine. It is also tied to some financial calculations found in most basic accounting software to include invoice aging, projected five-year planning, employee tenure for vacation accrual, and retirement vesting. The last two examples are of considerable importance to me and you.

"Now that we know the problem, how do we fix it? Our main task in the Financial Data Systems group here at SwRI is to first identify which programs out of the library of more than 2,000 modules are directly affected by the two-digit year. After we have compiled a list of all programs affected and to what extent, we will begin to change the code.

"There are two basic approaches we can use at SwRI. We could globally change all date fields on all records in all files from a two-digit number field to a four-digit number field. Or, we could use another program, called a subroutine, just prior to any comparisons or calculations and let the subroutine convert the dates, both current system date and stored date, temporarily into four-digit years. With either option, the new date calculations would be 2000 - 1944 = 56 -- the answer it should be. While the first method actually replaces the old date with the new expanded field, a one-time fix, the second method never saves the date and must be executed each time the program runs, for the life of the program.

"We have opted to use the second method due to the tremendous impact the first option would have on virtually all programs in the main system. Every place that the date field is referenced, whether in a comparison, calculation, or screen display, has to be modified. If you were to add up the number of lines of source code that would have to be changed, the second method becomes the winner due to the substantially smaller subset of programs and lines of code to be changed.

"What about Father Time's PC? Will his computer roll the date forward at midnight on December 31, 1999, to 12:01 a.m. on January 1, 2000? If he turns off his computer on Friday for the holiday weekend, will it boot up with the correct date the next workday after December 31, 1999? It really depends on his PC. The chip set in each computer along with its micro code determines how it will act. I would venture to guess no two personal computers at the Institute are identical in this regard. So while I could offer some ideas about some systems, I could not begin to say what will happen on all PCs on January 1, 2000. I myself plan to retire effective December 31, 1999, 11:59 p.m."

For additional reading, check out the web site devoted to the year 2000 problem. Thanks to this month's Whizard, Ron Wilson, manager of financial data systems in the SwRI Computer and Telecommunications Center. Wilson has spent the last 23 years in computer software development chiefly for IBM mainframe computers.

The Lighter Side SwRI Home

March 25, 2013