Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text Boxes, Set Century, Y2k
Message
De
20/02/1999 12:31:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00189162
Message ID:
00189668
Vues:
8
>>>>Hi,
>>>>
>>>>Regarding text boxes used to edit date fields. I have SET("CENTURY") set to off, and the 'century' property of the textbox set to off. If the century of the text box control source is 1900, the date is displayed, as expected, with no century. However, if the century of the text box value is 2000, FoxPro attempts to display the year as 4 digits, including the century. This is not desirable if the textbox width is not large enough to accomodate the century.
>>>>
>>>>Is this by design? It doesn't seem appropriate.
>>>>
>>>>TIA for any feedback
>>>>Regards
>>>>Bill Sabo
>>>
>>>Hi Bill,
>>>I asked this exact same question a few weeks ago and the general response was that it was by design :-(
>>>I think it's ugly and unnecessary and defeats the purpose (whether you like it or not!) of SET CENTURY OFF.
>>>This aweful effect also occurs in a grid/browse.
>>
>>Hi Dave
>>I agree 100%. I thought that SET CENTURY/ROLLOVER was a great addition to FoxPro, but it doesn't seem practical to use it with the century disply being handled this way.
>>
>>Thanks for the feedback
>>Bill
>
>
>Bill,
>IF you are inside the 'rollover' century, SET CENTURY OFF shows correctly. So if you set rollover to 50, then Feb. 9, 2005 will show as 02/09/05.
>
>Barbara

Hi Barbara

Thanks for the feedback, but here is the rub. I drop a textbox onto a form with a value of {12/29/99} and a command button that increases the text box's value by 1 in the click event. In the form Init I have SET CENTURY OFF and SET CENTURY TO 19 ROLLOVER 50. When you run the form, the text box displays the date correctly with no century as '12/29/99'. After 3 clicks of the command button, when the date hits {01/01/2000}, the text box displays the full century - '01/01/2000' instead of '01/01/00'.

Regards
Bill
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform