how to import 20080401 from CSV into access 2007 as a date format

  • Thread starter Thread starter sarahD
  • Start date Start date
S

sarahD

In access 2003 I could import a date eg 20080401 from a CSV file, and in
advanced options pick 'ymd' with no date delimiter, and access would import
it. In 2007 it says there are type conversion error's. I've no idea how to
get this format to import in as a date format.
 
sarahD said:
In access 2003 I could import a date eg 20080401 from a CSV file, and in
advanced options pick 'ymd' with no date delimiter, and access would
import
it. In 2007 it says there are type conversion error's. I've no idea how to
get this format to import in as a date format.

Hum, that seems to be a bug/problem.

You have to import that collum as a text field.

Then create a NEW collum that is a REAL date/time field.

Then, you have to run an udpate like:

update MyTablename set RealDateCollum =
dateserial(left(textDateCollum,4),mid(textDateCollum,5,2),mid(textDateCollum,7,2))

so, import the column as a text column, and then process as above. A bit
messy, but that is about the only workaround I can think of right now...
 
Back
Top