Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ctod() weirdness
Message
From
14/08/2015 12:04:30
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
14/08/2015 10:05:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01623085
Message ID:
01623409
Views:
48
>>>>Time for an extremely stupid question -- is there any particular reason why you have
>>>>SET CENTURY TO 20
>>>>instead of
>>>>SET CENTURY TO 19
>>>
>>>Thanks. It seems that this was the solution to the riddle. Setting it to 19, I get the correct date. Why the setting is so, I have no idea - Visual ProMatrix set it automatically. (Nor do I have any clear idea why, according to Visual FoxPro, I should set century to 19, when we are actually in the 21st century...)
>>
>>It's zero based.
>>
>>IOW, the XX century is "all the years written as 19nn, including 2000 but excluding 1900", so this "set century to 19" is actually "set the hundreds part of the year to 19". The word century here is a complete misnomer.
>
>Even with these non-standard definitions, I would expect to have to specify the "century" as 20, since that's the "century" we are in, i.e., the current year starts with 20. But when I do that, I get a year that starts with 21 - so, a year in the 21st "century" according to the logic you explained. However, perhaps the ROLLOVER somehow adds one more digit to the century.

Keep in mind that these things were written from the perspective of Y2K craze. So everyone had calendars with years beginning with 19 in their sights, and in that context it probably made sense.

Now add 20 years to the context.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform