Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro Y2K issue
Message
De
10/11/1999 12:38:39
 
 
À
10/11/1999 12:14:18
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00289646
Message ID:
00289682
Vues:
21
>>>>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
>
>I remember a problem with 02/29/2000 internal to FP. I've converted the last of my in-house apps to VFP, and was very pleased with Y2KFOX, which bought me the time to do it right rather than try to kludge along with legacy code.

I know FP can't handle 02/29/00 because FP will evaluate it as 02/29/1900. Other than this, do you think my approach is okay. I dont have the resources right now to convert it to VFP.
I also consider the CTOD function overriding it to my own Y2K_CTOD just in case any conflict occurs.
Thanks again.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform