Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ctod() weirdness
Message
De
10/08/2015 12:29:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
10/08/2015 12:06:51
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:
01623090
Vues:
66
>>>>Why would a command such as:
>>>>? ctod("10/13/15")
>>>>give me the following result?
>>>>10/13/2115
>>>>In other words, next century instead of the current century.
>>>>
>>>>I am trying to import data from a text file, and thought ctod() would be a quick solution. Actually the dates seem to include a century, so the question might be irrelevant for this particular task, but I was still curious what I did wrong.
>>>>
>>>>Here are some relevant settings (Visual FoxPro 9):
>>>>set("date") = "AMERICAN"
>>>>set("century") = "ON"
>>>>set("century", 1) = 20
>>>>set("century", 2) = 65
>>>>set("century", 3) = 2029 && what the heck does this do?
>>>
>>>What is the setting of Rollover? That may be the issue and what Set(Century, 3) is.
>>
>>According to help, rollover would be set("century", 2) - in this case, 65. Strangely, even for the CURRENT YEAR (see example above), it advances to next century.
>
>Is the current system date correct?

Yes. I forgot to mention that, but that was actually one of the first things I checked. According to my computer, the year is 2015.

I just did another check. Accessing Visual FoxPro normally, I get a date for the year 2015; the problem mentioned in my original post appears when I access via Visual ProMatrix, which I use for one of my clients. Therefore, it stands to reason that it is related to some specific setting - but I have no idea which one that would be.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform