Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM not Y2K ok.... know a fix?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00241414
Message ID:
00242513
Vues:
27
>Hi Bob,
>
>>I found this out from a client today. If you use append from on an SDF file with a date in it... even if all 4 digits of the year are in the file FoxPro imports it to a date field using the first two characters of the year (century) as the year, and ALL dates have a 19 as century.
>
>This is really strange!
>
>Everyone here seems to confirm what you are seeing. When I wrote my Y2K article this was one of the things that worked perfectly in FoxPro 2.6 DOS and Windows. No matter whether SET CENTURY is ON or OFF, APPEND FROM TYPE SDF added a 4 digit year, when the SDF file contained 4 digits. Only when the source file had only 2 digits, VFP assumed 19xx as the century, but that's impossible with SDF files.
>
>Therefore I just tested this again, and it still works. Could the difference be that I'm running FP 2.6 and you probably 2.6a? Unfortunately, there was no German 2.6a, therefore I can't test here. Here's my test code:
>
>
>SET CENTURY OFF
>USE SYS(2005) AGAIN
>COPY TO Tmp.DBF
>USE Tmp.DBF EXCL
>REPLACE Updated WITH GOMONTH(Updated,1200) ;
>  FOR MOD(RECNO(),2) == 0
>COPY TO Tmp.TXT TYPE SDF
>ZAP
>APPEND FROM Tmp.Txt TYPE SDF
>SET CENTURY ON
>BROWSE
>
>
>Christof

Christof,

I ran your test with FoxPro 2.6a for DOS (on a Windows 95 machine) and got correct results, i.e. the century was correct even after the APPEND.
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