Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Y2k problem when importing data
Message
From
01/03/2000 13:43:19
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00339860
Message ID:
00339969
Views:
18
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
Previous
Reply
Map
View

Click here to load this message in the networking platform