Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FPD 2.6 and FPW 2.6 Y2K compliancy
Message
De
25/03/1998 13:43:06
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
 
À
25/03/1998 13:21:57
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00087072
Message ID:
00087079
Vues:
34
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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform