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

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.
 
A

Albert D. Kallal

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...
 

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