Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Desperate for help with Year 2000 & CTOD incompatibility
Message
 
 
À
26/06/1998 05:21:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00111866
Message ID:
00111959
Vues:
26
>>I am trying to get my hands on a replacement function for the foxpro2.6 CTOD function.The problem is that this function will default to century 19 regardless of the system century when a variable is initialised with CTOD(' / / '). I've been told that such a replacement was provided with the March edition of Foxpro Advisor. Apparently it can be implemented using #DEFINE. Any help will be very, very much appreciated.

>I'm not sure I understand you. With set century on there wouldn't be a problem. Can you elaborate it more ?
>Cetin

Dermot,

Cetin is correct, CTOD( ) works fine. But it is controlled by the SET CENTURY TO xx ROLLOVER yy, not by SET CENTURY ON | OFF. If your character date has a four digit year then that's what CTOD( ) uses. If your character date has a two-digit year, then CTOD( ) respects the setting of SET CENTURY TO xx ROLLOVER yy.

Try the following (in VFP 5.0a):
SET CENTURY ON
SET CENTURY TO 19 ROLLOVER 50

?{06/26/98} --> 06/26/1998
?{06/26/48} --> 06/26/2048

?CTOD('06/26/98') --> 06/26/1998
?CTOD('06/26/48') --> 06/26/2048
BTW, you can display the values of the century default and rollover. In the example above,
?SET('CENTURY', 1) --> 19
?SET('CENTURY', 2) --> 50
HTH,
Rick
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform