Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please help with ROLLOVER...
Message
From
24/01/2000 18:33:20
Cheryl Qualset
Qualset Computer Consulting
Davis, California, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00321806
Message ID:
00321925
Views:
23
Others have mentioned the scope.

My comment is about hard coding 20 as the rollover number.

Century and rollover give you a window of 100 years where the century will be assigned to 2 digit dates. The rollover number determines when the next century will be applied instead of the SET CENTURY value.

If you hard code a 20 as the rollover, and keep the default century, in a few years this will be as unacceptable as FoxPro's 50 is today.

I choose to have my applications assume a date will be up to, say 10, years in the future, and otherwise it is in the past 90 years. To achieve this I subtract 90 from the current year and set the century to the century of that year and rollover to the least significant digits of that year.

This is what FoxPro does by default, but they choose to look ahead 50 years and back 50 years. (If you set your clock to 2001, you will see that 1949 changes to 1950 as the boundary year for your birthdates.)

It is not likely that you will need to change how far in the future your application 'looks'; it is guaranteed that you will have to change the rollover number if it is hard coded.

Cheryl

>I'm having a problem with the ROLLOVER setting for the dates in my application.
>
>The birthdates seem to be the only fields that are affected, as those are the only dates that go back to 1949 and beyond.
>
>Where do I have to insert the following line?
>
>SET CENTURY ON ROLLOVER 20
>
>I have it in various places throughout my application, but no matter where I put it, anytime I enter a date prior to 1950 in the form mm/dd/yy, it defaults the century to 20. Are there additional setting I have to use for that particular text box?
>
>I know you can use the regional settings tab (Tools/Options from the FoxPro menu bar) to set the century on or off, but there is no setting for the ROLLOVER value.
>
>I really didn't want to use the Windows default system settings for this, but I may have to resort to that.
>
>Can anyone shed a bit of light on this for me?
>
>Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform