Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FPD 2.6 and FPW 2.6 Y2K compliancy
Message
From
25/03/1998 13:21:57
 
 
To
25/03/1998 13:17:02
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00087072
Message ID:
00087073
Views:
23
>Hi all,
>
>current implementation of Year 2000 project in my company has raised a question of FoxPro 2.6 (DOS and Windows) being compliant with Y2K.
>
>Now, I know that both FPD and FPW 2.6 physically save dates in YYYY/MM/DD format in DBF table, and the way you (or your user) are going to see it depends on SET CENTURY and SET DATE settings.
>
>However, I've noticed that if I set the system date in Win95 to year, say, 2005, set century to 'on' and then try to enter the date in the table, the following occurs: if I enter only 2 digit in the year portion of the field, FoxPro will automatically add '19', regardless of the fact that year() will return '2005'. Same thing is with VFP 3 and 5, as well.
>

Yes, 2-digit year dates in 2.6, unfortunately, will always assume "19" as the century. Not so with VFP -- look at the SET CENTURY TO ... ROLLOVER command...it allows you to change the assumed century.

>Anyway, for same reason, the prevailing opinion here is that FPD and FPW 2.6 are not compatible with Year 2000 standard, but having in mind the facts above, I really wonder why would that be. Can somebody please shed some light on this issue? TIA,
>

Meaning, can you trust 2.6 with 2 digit dates?? Nope. Not using the native Date variable type. You can trust VFP...thje following is pasted directly from a VFP 5.0 help screen:

SET CENTURY ON
SET CENTURY TO 19 ROLLOVER 60
? {02/16/96} && Displays 02/16/1996
? {02/16/56} && Displays 02/16/2056
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform