Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date problem with Ms-Excel data import with APPEND FROM
Message
De
09/10/2001 10:31:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00565866
Message ID:
00565932
Vues:
17
Sergey,
Not quite. Depending on how you format your data, the output varies. Here's a sample of differently formatted date cells saved as a CSV:
Date1,Date2,Date3,Date4,Date5,Date6,Date7,Date8
31.12.2000,1.1.2001,12.31.2000,03.01.2001,j,j-01,1.6.01 12:00 AM,01.07.01
Save above text into a file and try the following:
CREATE CURSOR test (d1 d, d2 d, d3 d, d4 d, d5 d, d6 d, d7 d, d8 d)
APPEND FROM < YourCsv > TYPE CSV
This results in a "Date/Datetime evaluated to an invalid value" error when you try to BROWSE the cursor. However, the program I provided correctly imports the dates from the Excel file.

>>Hi everyone,
>>
>>After importing spreadsheet data from Excel 97 with "append from &fname type xl5" the date fields in my target DBF come out blank. I've tried the various date column formattting options in Excel. What do I need to do?
>
>Saving your Excel data in CSV format will preserve all formatting. After that use APPEND FROM .. DELIMITED to append CSV file into foxpro table/cursor.
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform