Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Y2K Tip of The Day
Message
From
12/10/1999 16:20:22
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Y2K Tip of The Day
Miscellaneous
Thread ID:
00275606
Message ID:
00275606
Views:
52
Hi All,

Often overlooked in our mad rush to make our older FP applications Y2K compliant is the fact that the PC BIOS may not be Y2K compliant. There are many quality apps out there that will fail on 1/1/2000 because the BIOS will start believing that its 1/1/1900. What to do? I've started wrapping all DATE() calls with a little program called Y2KDATE:
FUNCTION Y2KDATE
PARAMETERS dDate
IF PARAMETERS() < 1
   dDate=DATE()
ENDIF
IF dDate < {01/01/1980}
   dDate = GOMONTH(dDate,1200)
ENDIF
RETURN dDate
No PC BIOS will have a date before 1980, and if it does, adding 1200 months (not 100 years) to the system will fix it. The syntax for this is Y2KDATE(DATE()).
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Next
Reply
Map
View

Click here to load this message in the networking platform