Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ctod bug
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00105986
Message ID:
00106091
Vues:
29
Hi Derk,

There was a thread on this issue a year or so ago here on UT. The consensus seemed to be as follows: Fox can store dates from 01/01/0100 through 12/31/9999, but some of the date functions do not always work with dates prior to a certain time. For example, in my own admittedly non-rigorous testing with VFP 5.0a, GOMONTH(date, 12) returns " / / " for any date prior to 01/01/1752, but GOMONTH(date, 120) works with dates back to 01/01/1743.

My understanding is that the Gregorian calendar replaced the Julian calendar in 1582, at which time several changes were made that mess up the "how many days between two dates" type of calculation for dates than span that year. So it's understandable why some of VFP's date calculations would not work for dates prior to 1582, but I don't know what the significance of 1752 or 1743 is.

>Hey folks!
>
>We found what seems to be a bug, both in VFP 5.0a and VFP6 beta. Maybe some of you have encountered it before, but we never read about it on the Compuserve forum, so we thought we'd post it.
>
>set date to long
>?ctod("01/01/1597") returns nothing (or empty string)
>set date to short
>?ctod("01/01/1597") returns nothing (or empty string)
>set date to YMD
>?ctod("01/01/1597") returns / /
>
>should be 01/01/97, right? Works fine with other date formats. Plus,
>
>set date to short
>?ctod("01/01/1597") + 1500 returns 9-02-01, correct!
>
>We concluded that CTOD doesn't work correct (at least doesn't return correct values) for dates < 01/01/1601. Has anyone seen this before?
>
>greetings,
>derk schutte
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform