Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET CENTURY stuff
Message
De
08/04/1999 13:34:40
Bob Lucas
The WordWare Agency
Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00206098
Message ID:
00206531
Vues:
21
This may be overkill, but I wonder what affect it would have to change the set century setting before entering the textboxes (in the gotfocus)

for instance

lccentury = YEAR(this.value)
SET CENTURY TO lccentury


This might help keep the year at two digits.

I did an evaluation of a FPW 2.6 application for Y2K compliance, and though it only ever used two digit days, I could not get it to produce wrong results. If I entered a year like 05/12/31 it displayed in the debug window with a year of 1905 when I meant 2005 but after the data was save and retrieved, it came back as 2005!

The reason was that SQL was the data store and when you try to store an ambiguous date it used its built in rollover to properly assign the century. It may be that the app had some Y2K issues, but in spite of all the dates I messed with (even on date range forms when selecting report data, etc.) It always worked as expected.

the only time it started to mess up was when century was set on.
Disappointing.

So I agree with your point. If your users want two digit years, they should have them. As you imply, you know how to deal correctly with this data.


>>>
>>>If you show 4 digits, you have to enter 4 digits when you enter dates in the YMD format.
>>>
>>>Joe
>>
>>
>>
>>Not true! You CAN enter only 2 digits, no matter what the format is.
>
>Then why when I tab to a field that is showing 2001/01/02, and I enter the keystrokes 990501 does it not work? It tries to put the date 9905/01... into the field.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform