Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing into a DateTime field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00025879
Message ID:
00025949
Vues:
25
>I am having a problem importing into a DateTime field. The exported datetime data appears like this:
>
>"1995-04-24-13.34.52.720000"
>
>The VFP 5.0 import wizard ignores this field and the DateTime field ends up empty.
>
>If I revise my import data to look like the following (no double-qoutes, colons separating the time instead of periods, and removal of the last time unit (720000), it works.
>
>1995-04-24 13:37:03
>
>Is there anyway I can use code instead of the wizard to import the data in the first format? If not, I'll have to edit all of my import data to match the second example (and I don't want that!).
>
>Jeff Rusch
>UW-Madison

I think it's reasonable to import to character field (add one more) and when it's finished run just one command:
REPLACE ALL fldDatetime with CTOT(LEFT(fldChardtime,19))
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform