Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Y2K Slap in the Face
Message
From
21/03/1999 13:51:59
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00199762
Message ID:
00200290
Views:
17
>>>SET CENT TO VAL(LEFT(ALLT(STR(YEAR(DATE()))), 2))
>>>
>>>in my startup.prg. I didn't know about the little vfp5 bug when I submitted my Y2K docs, and said that vfp5 was compliant without SET CENTURY (whoops)...
>>
>>Set Cent to int(year(date())/100)
>
>You're right, that's shorter. I don't profess to being a date whiz :) I guess they're like puzzles to some of you, I see the contests to see who can get the shortest date function on the UT often :)

If you ever get to run a Fox conference, anytime you notice the number of messages is declining, just propose a date problem, like "how do I calculate third Friday in May", and wait for the avalanche.

It's actually a hobby for many of us. I remember I had to write twenty or fifty lines and a couple of tables of pre-calculated constants in Cobol, just to do something which is now an one-liner in Fox. No wonder I love it.

back to same old

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

Click here to load this message in the networking platform