Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Y2k problem when importing data
Message
De
01/03/2000 13:43:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00339860
Message ID:
00339969
Vues:
16
Scan thru the file with something like:
SET CENTURY ON
SCAN
  IF YEAR(Mydate < 1950)
    lcMonth = SUBSTR(DTOC(Mydate),1,2)
    lcDay   = SUBSTR(DTOC(Mydate),4,2)
    lcYear  = SUBSTR(DTOC(Mydate),9,2)
    
    lcYear  = "20" + lcYear

    ldNewDate = CTOD(lcMonth + "/" + lcDay + "/" + lcYear)

    REPLACE MyDate WITH ldNewDat
  ENDIF
ENDSCAN
pf

>I have a delimited ascii file that I am importing via the import wizard. The data has dates in the format 01/01/00 which I
>wish to represent as Jan 1, 2000. After the import, if I "set century on" the years all show as 1900 instead of 2000. What
>can I do to import this correctly?

(On an infant's shirt): Already smarter than Bush
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform