Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DATE BUG ????
Message
 
À
11/02/2000 08:29:02
Amit Abhangrao
Charmi Software Exports
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00329861
Message ID:
00330645
Vues:
16
>Why you are focusing on CTOD() Function. The code gives error at
> If Empty({02/15/2000})
>
> Here I have not used CTOD() at all and not Date() function also.
>But it will return false for DATE() also for the date greater than
>12th of the month (if the program is compiled when setting is SET DATE BRIT).
Mallari,m

Yes if SET DATE is BRIT when you compile it errors because there is no month 15. If you SET DATE AMERICAN before compiling it doesn't error and the date becomes Feb, 15, 2000. The point is that the DATE setting at the time the code is compiled determines how the literal is interpretted.

I am not focusing on anything in particular. I am pointing out thet date literals, CTOD(), and CTOT() can cuause problems because they are dependent on the SET DATE setting. By doing SET STRICTDATE TO 2 you be notified of all occurances of these functions and literals in your code and you won't have to wait to see if they work correctly or not.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform