Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Year 2000
Message
 
À
18/03/1998 14:12:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00085426
Message ID:
00085468
Vues:
28
>>>I am having a problem making a program year 2000 compatible. I need to display dates in a textbox in mm-dd-yy format. I have been trying to use SET CENTURY OFF and SET CENTURY TO 19 ROLLOVER 60. Any time this command is in effect and I type 01-01-01, the textbox automatically displays 01-01-2001. I have tried tinkering with as many date related settings and properties as I can find, but with no success. This happens in browse windows also. What I am I doing wrong?
>>Nothing. Try typeing in 01-01-61. It should show 01-01-1961. Any year after 60 is considered to be a 1900 year and any year before 60 is considered to be a 2000 year.
>
>Internally, SET CENTURY TO is exactly what I need, but I can't control the display of dates.
>If I type 01-01-61, it displays 01-01-61. If I type 01-01-01, it displays 01-01-2001 and I only want it to display 01-01-01.
Guess I should have 'read the problem' a little more carefully. One way to get the display you want is to set the ControlSource to a dummy variable say "xdate"(character string with a datetype input mask - ##/##/##.Then put :
testdate=ctod(substr(xdate,1,2)+'/'+ substr(xdate,4,2)+ ;
'/'+ substr(xdate,5,2))
in your valid event(where testdate is your real data item. There is probably a better way but this works.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform