John Dale
John Dale

Reputation: 63

MS Access mporting dates

At the end of importing a .txt file through the help of the wizard i get a message that some elements were not imported correctly. I have a column in the .txt which should contain dates, but for some reason when i select the column containing dates, and i set its type to date and time, for some reason access cannot recognize them as dates. I'm thinking that it's because of the language difference. I use dates like: 1.1.2011, whereas access uses 1/1/2011.

Where can i change the format?

Upvotes: 0

Views: 23

Answers (1)

Gustav
Gustav

Reputation: 55841

You can in the Advanced section of the Import Wizard.

If that doesn't work, don't import but link the file and specify the date field as text.

Then create a simple select query where you use the linked table as source. Select all the fields you need.

For the date field, use this expression:

TrueDate: CDate(Replace([YourTextDateField], ".", "/"))

Clean up other fields as well.

Now use this query for the further processing of the data.

Upvotes: 1

Related Questions