Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Year 0000
Message
De
13/04/2005 18:57:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01003937
Message ID:
01004422
Vues:
31
This message has been marked as a message which has helped to the initial question of the thread.
>Ok, here is what I found: all dates before 03/01/0000 are considered invalid dates and the message is shown. All dates with date later than 03/01/0000 including that date are considered valid dates. That's VFP native behavior.
>
>Do you have explanations for that?
>
>Thanks in advance.
>

Because before you have the 00 ( Big Bang ) day:
clear
? DATETIME(100,12,31,0,0,0)-(365*100+329)*86400
? DATETIME(100,12,31,0,0,0)-(365*100+329)*86400-1 && look the day ! exists a little bug here, expected empty
? DATETIME(100,12,31,0,0,0)-(365*100+330)*86400	  && the last computed datetime
? DATETIME(100,12,31,0,0,0)-(365*100+330)*86400-1 && now the C++ routine trap the bad value

minCorrectDatetime  = DATETIME(100,12,31,0,0,0)-(365*100+329)*86400

minComputedDatetime = DATETIME(100,12,31,0,0,0)-(365*100+330)*86400
* probe datetime C++ functions
? DAY(minComputedDatetime)	,DAY(minCorrectDatetime)
? TTOC(minComputedDatetime)	,TTOC(minCorrectDatetime)
? DMY(minComputedDatetime)	,DMY(minCorrectDatetime)
? MDY(minComputedDatetime)	,MDY(minCorrectDatetime)
* NOW YOU HAVE SMASHED the limit of 03-01-0000
? TTOD(minComputedDatetime)	,TTOD(minCorrectDatetime)
* try on a variable
x = TTOD(minComputedDatetime)
? x  && not checked
? x+0 && but this comes checked
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform