Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to read in a Excel File and convert it to DBF file ?
Message
De
16/12/2008 08:30:20
 
 
À
15/12/2008 23:27:08
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01272982
Message ID:
01367820
Vues:
22
Hi,
I will investigate that but you can
check the format used for dates in the Excel file (for example dd/mm/yy) and
see if it's the same in your application. By default FoxPro uses date in
American format (mm/dd/yy). The date format in your application
must match the one in your excel file.

In vFoxPro you can use the commands SET DATE and SET CENTURY to
make the date format match the one in your Excel files.
SET CENTURY OFF

SET DATE BRITISH
? DATE()	&& result 16/12/08

SET DATE AMERICAN
? DATE()	&& result 12/16/08

SET DATE USA
? DATE()	&& result 12-16-08

SET DATE JAPAN
? DATE()	&& result 08/12/16

SET DATE GERMAN
? DATE()	&& result 16.12.08

SET CENTURY ON
? DATE()	&& result 16.12.2008

SET DATE JAPAN
? DATE()	&& result 2008/12/16
Here are the settings and the resulting date formats:

Setting (Format)
AMERICAN (mm/dd/yy)
ANSI (yy.mm.dd)
BRITISH/FRENCH (dd/mm/yy)
GERMAN (dd.mm.yy)
ITALIAN (dd-mm-yy)
JAPAN (yy/mm/dd)
TAIWAN (yy/mm/dd)
USA (mm-dd-yy)
etc ...
>Hi,
>Thank for your reply.
>I find that the date format column in my excel worksheet cannot import to the cursor.
>all date value change to " / / " in the cursor after import. why ?
>
>Please advise.
>
>Thanks.
>Derek
***
TONY Nascimento
*****************

"Your mind is like a parachute. It only works if it is open" - Anthony J. D'Angelo

"The desire to know is natural to good men" - Leonardo da Vinci
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform