If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Importing Date from .CSV
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") |
#2
|
|||
|
|||
Importing Date from .CSV
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. -- Ken Snell MS ACCESS MVP wrote in message ... 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") |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Query Criteria where a single date comes from a form | Gary O | Running & Setting Up Queries | 3 | July 23rd, 2004 05:24 PM |
Stop Word from automatically updating date field when document is opened | Eternal | General Discussion | 4 | June 18th, 2004 01:00 PM |
Date Function with literal date does not resolve True | Cam | Worksheet Functions | 6 | April 30th, 2004 04:02 PM |
Does date fall between two ranges? | MR | Worksheet Functions | 4 | January 14th, 2004 04:08 PM |