Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ctod() weirdness
Message
De
14/08/2015 07:04:31
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
14/08/2015 05:49:10
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01623085
Message ID:
01623390
Vues:
52
>>>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.

Hi Dragan;
SET STRICTDATE TO 0
SET CENTURY TO 19
?{01.01.01}
*output 01.01.2001
?{01.01.00}
*output 01.01.2000
?{01.01.99}
*output 01.01.1999
?{01.01.65}
*output 01.01.1965
?{01.01.64}
*output 01.01.2064
ROLLOVER, if not defined, goes to (YEAR(DATE())+50)%100
even if, at your place, it goes to 0 as one could read out of the help (but to me it means only at version 5) , this will change in 35 years.
What is the return of
?SET("Century"),SET("Century",1),SET("Century",2)
on your comp?
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform