Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ctod() weirdness
Message
From
14/08/2015 10:05:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/08/2015 05:49:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
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:
01623397
Views:
51
>>>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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform