Year 2000 issues in Clipper


Clipper

Summer'87 and 5.x: Use SET CENTURY ON to display all 4 year digits. The Oasis FTP site has a patch y2000s87.zip to simulate the SET EPOCH feature in Summer'87 applications if you have the source code.

Clipper 5.x only: Can also use SET EPOCH TO 1950 for a fixed window.

Or use SET EPOCH TO (YEAR(DATE())-70) for a sliding window.

Paul Lea Lujanac has an article on other issues in Clipper applications. He points out that the LUPDATE() function wraps to zero because there is only one byte in the DBF header to store the two-digit year.

 

FoxPro

Use SET CENTURY ON to display all 4 year digits.

Check out an article by Peter Somers in the February '96 issue of FoxPro Advisor for a discussion of the topic. Also, articles by Brad Schulz in the October '96 issue and the forthcoming December '96 and January '97 issues discuss ways to handle dates better. The best documentation and software fix (MCDATE, a VALID clause for Date GETs) is in FP2000A.ZIP, available in FOXFORUM on CompuServe.

Brad Schulz comments: The big problem is that the year 2000 is a leap year, and so February 29th is a valid day in that year. However, if you have SET CENTURY OFF and attempt to use MCDATE (above) it will be impossible to enter 02/29/00 because FoxPro intercepts it as an invalid date before the VALID clause even fires. This is because FoxPro interprets 02/29/00 as a year in 1900 and 1900 was *not* a leap year, so it is rejected outright.

VFP 5.0 has the new command SET CENTURY TO cc ROLLOVER yy

Communication Horizons publishes Y2KFOX Millennium Bug Fix for FoxPro. Y2KFOX sets century rollover in FoxPro and FoxBase+, so that 2-digit years default to the correct century. It requires no reprogramming. They will be releasing Century Rollover for CA-Clipper and Visual Basic 3 soon. The url is http://www.y2kfox.com

 

dBase

Use SET CENTURY ON to display all 4 year digits.

Other links

http://www.the-oasis.net Phil Barnett's Oasis FTP site has more information and patches for Year 2000 in Clipper and xBase Languages. 

Greg Holmes:  Data File Headers and the Year 2000 www.ghservices.com/gregh/clipper/trix0011.htm


 

Scan your source code for year 2000 problem

Here some keywords relevant to Clipper programmers. Although xBase files store dates as 8 digits, data input pictures and index keys could use /yy.

SET DATE ... Sets the global date display format, might be "dd/mm/yy"

CTOD() Converts Char string in global format to Date

DTOC() Date to Char in global format

SET EPOCH TO 1940  Sets a window for dates 'dd/mm/39' is 2039

SET CENTURY OFF  is the default, enables the display of 2 digit years.

STR(<expr>,2) Where <expr> _might_ be a year number

Look for String constants such as  "yyyy", "19", "@D", "@E"

There are other functions such as date(), cmonth(),cdow(), dow(), etc., but none of them should affect the Y2K problem.

Year 2000 issues in Access

Home