Problem importing dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a text file with fields delimited by |
When i do a straight import and look at the table data types some are text
and some are date/time (with no format) the dates that come look as they do
in the text file 2005/10/30.

What I want to do is import the data to a table with the data type for dates
as date/time formatted as short date.( I can't alter the text file at all) If
I set up specifications as date/time I am getting type conversion errors and
no date importing at all: Does anyone know how I can deal with these dates to
get them to import and in the format of dd/mm/yyyy instead of yyyy/mm/dd

Any help greatly appreciated
 
The most common solution is to import the data to a temp table.
Do this so that you do not lose any of the data!
e.g. set all fields to Text.

Then, once the data is in Access, write a query to move the data out of the
temp table to the real table.
Use Date functions to transform the bad dates to the ones you want.
 
Thanks Joe. That's what i thought I might get, was just hopeful there may
have been another way.
 
Not using the wizard.
You can use code if you want though.
Then you can "transform" as you read.

As far as using a temp table, in my opinion:
There is way too much emphasis on doing things with "1 line of code".
Nothing wrong with taking 2 steps to get the right answer.
 
Back
Top