>is there any other to solve y2k problem in Foxpro2.6 except set century off.
Mubashir,
(To add to what the others have said)
See Christof Lange's article "Y2K solution for FoxPro 2.6" in the files section (file cabinet icon) under "Coding, Syntax, and Commands." It has been updated somewhat since it was published in FoxPro Advisor.
I have been using this code for several months and it has done well for me.
In addition to setting CENTURY ON you will need to:
1. Widen the spaces on your forms and reports to show all 4 digits of the year. That is the only way dates will not be ambiguous.
2. Eliminate dates which are stored as characters in your data, or identify a reason why they are ok. For example, in a MEMO field for a sales contact database, "Called Harry on 2/29/00 and told him to pay his bill." would be ok with me since there will be no calculations performed on that date.
3. Notify your users (unless you have custom code that has a rollover feature) that any date entered with only 2 characters will default to the 20th century. That means typing "01/01/01" actually stores {01/01/1900}. Because of this, you may want to add some "reality check" code, like dDateOfSale can't be before {01/01/1990}. In order to store {01/01/2000} the user will need to type "01/01/2000."
4. Comb through your code for hard-coded CTOD()'s which use a 2-digit year and correct them. Be sure that any DTOC()'s will fit where they are supposed to now that they have 2 more characters.
Hope this helps.
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