Importing Date from .CSV

G

Guest

G'day,
I'm attempting to import a .CSV file into a table. The
file is properly comma separated, but also has "quotes"
around each entry. Importing numbers and text works fine,
but the date entries yeild a "Type Conversion Failure".

sample .CSV data:
"8/1/2004 10:00 AM","david","4"

The "david" comes in fine as text david (without quotes),
and the 4 comes in as a usable integer, however, the date
leads to a failure unless I call the field type Text
instead of Date.

Comments, Suggestions, Work arounds?
(This is annoying because in a sort ascending, the text
date/times will come as 1:00, 10:00, 11:00, 12:00, 2:00,
3:00, 4:00..., since text "10" comes before text "2", even
though time "2" comes before time "10")
 
K

Ken Snell

Import the file's data into a temporary table, and import all as text.

Then run append query to copy the data *in the correct format* to your
permanent table. You can use the append query to change the text to date, or
text to number, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top