Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Year 2000 problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00050555
Message ID:
00052370
Vues:
42
>>>One tiny problem with this. Try to enter the date 02/29/00, a valid date
>>>for year 2000. The problem here is that Feb 29, 1900 is not a valid date
>>>(not a leap year).
>>>
>>
>>Well, 2000 should be a leap year, since it's dividable (divisable?) with
>>400. Can anyone clear this out?
>
>That's what I'm saying. 2000 is a leap year, but 1900 was not. If you have SET CENTURY OFF and are using the valid method mentioned in this thread to change the century, then (at least in Fox 2.x, I haven't tried it in 3.0) you will get a FoxPro message "invalid date" BEFORE you ever get to your validation for the field.

Yes, it's still true in vfp5, too, so we have to be careful...But probably all our vfp apps should use ROLLOVER as needed to avoid the problem...

SET CENTURY TO 19 ROLLOVER 80 will put you in 1980-2079, for example, for any given two-digit year...Of course, I expect my apps to last 80 years or so (s).
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform