>>Hi,
>>Is there any problem when I convert all my "get" date variable fields into character fields and then convert it to date. The reason for this is to make sure that the user enters the four digit year. Thanks.
>>
>
>There are known issues with the FP CTOD() function. I'd suggest investing in a canned solution like Y2KFOX, or simply turning on SET CENTURY ON throughout your system - you are at no more risk of error with that than with date conversion.
What I plan to do is to have a general VALID function on all of my get (date fields) statement. Here are the conditions on the valid:
IF LEN(ALLTRIM(tcDate1)) < 10 .OR. ;
CTOD(tcDate1) == {} .OR. ;
VAL(RIGHT(tcDate1,4)) < 1900 THEN return .f.
Thanks Ed for replying
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement