Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET CENTURY stuff
Message
From
08/04/1999 22:18:15
 
 
To
08/04/1999 18:14:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00206098
Message ID:
00206745
Views:
35
>Fred,
>
>I can't fiddle with my clock setting, but I wonder what one might get if the ACTAUL date (according to the system clock) was sometime in 2000+?... would then the 19 show up as 4 digits while a 00 would remain as two digits???
>
>Just curious
>
>Jim N

Set my clock to 4/8/2000.
No change. 20xx still shows 4 digits, and 19xx still goes back to 2. (VFP5)


>
>>>>>>If you're using VFP6, maybe you could set the date fields .Century property to 0 in the .GotFocus method, and reset it to 1 in the .LostFocus method. That way it would show as 4 digit years when the control did not have the focus, but allow you to enter just the 2 digit years. Would that work for you?
>>>>>
>>>>
>>>>I just tried it in VFP5, and it will work. See if that works for you.
>>>
>>>I couldn't get it to work.
>>>
>>>Global settings are
>>>
>>>SET CENTURY OFF
>>>SET CENTURY to 19 ROLLOVER 5
>>>
>>>When I enter 02/03/03 and leave, it shows 2002/03/03 and when I tab to the field, it still shows the 4 digits.
>>>
>>>Do you see different behaviour? If so, maybe I can get a sample form from you.
>>>
>>>Thanks,
>>>Joe
>>
>>If the date entered is 20th century (19xx) then it does go back to 2 digits. If its 20xx then it stays as 4 digits. VFP 6 works OK, VFP 5 does not. I guess you could put some code in the KeyPress method to handle the date entry. Sorry.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform