Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FPD 2.6 and FPW 2.6 Y2K compliancy
Message
From
25/03/1998 13:43:06
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
 
To
25/03/1998 13:21:57
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00087072
Message ID:
00087079
Views:
33
ROLLOEVER is available only with 5.0.

I use a rolling rollover window which begins 30 years prior to current system date:
FUNC f_Y2Kfix
  LOCAL lnCent, lnRoll

  lnCent=INT(year(date())/100)
  lnRoll=MOD(year(date()),100)-30  && start the window 30 years prior to today

  *- correct for century since prior century entries are still possible
  IF lnRoll < 0   
     lnCent = lnCent-1
     lnRoll = lnRoll + 100
  ENDIF
  
  SET CENTURY TO (lnCent) ROLLOVER (lnRoll)
In other words, I can use standard mm/dd/yy fields to enter years 30 years back and 70 years up. so for 1967, I'd need a wider field and for 2068, I'd need a wider field, but for most business apps, this should work fine.
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform