Testing Two-Character Date Applications - WinRunner

In the past, programmers wrote applications using two-character fields to manipulate and store dates (for example, ‘75’ represented 1975). Using a two-character date conserved memory and improved application performance at a time when memory and processing power were expensive.

Many of these applications are still in use today, and will continue to be in use well into the 21st century. In industries where age calculation is routinely performed, such as banking and insurance, applications using the two-character date format generate serious errors after December 31, 1999 and must be corrected.

For example, suppose in the year 2001 an insurance application attempts to calculate a person’s current age by subtracting his birth date from the current date. If the application uses the two-character date format, a negative age will result (Age = 01 - 30 years = -29).

In order to ensure that applications can accurately process date information in the 21st century, programmers must examine millions of code lines to find date-related functions. Each instance of a two-character date format must be corrected using one of the following methods:

  • Windowing

    Programmers keep the two-character date format, but define thresholds (cut-year points) that will determine when the application recognizes that a date belongs to the 21st century. For example, if 60 is selected as the threshold, the application recognizes all dates from 0 to 59 as 21st century dates. All dates from 60 to 99 are recognized as 20th century dates.

  • Date Field Expansion

    Programmers expand two-character date formats to four-characters. Assessment testing helps you locate date-related problems in your application.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics