0

I am importing a HTML file into a database in Microsoft Access and the HTML file contains a column with date.

For instance, the column contains data like "25 May 15". When I import the data into a table, I face two Import Errors.

First Error:

It gives an Import Error called Type Conversion Failure when I import the data as Date/Time. However, it works fine when I import it as text format.

Second Error:

When i add similar table which the date data is of "24 May 15", on top of the current table. It gives an Import Error called Type Conversion Failure. It doesn't allow me state the type of format of the date column.

Need some guidance on how to solve this date/time issue.

1
  • It sounds like Gustav's solution is your only option, unless you want to write a script to remove the double quotes from your HTML before importing. Commented May 26, 2015 at 19:43

3 Answers 3

1

Import the date as text to a (temporary) table.

Then use a query to convert the text date to a true date with DateValue(). It will convert, say, the string "25 May 15" to the date value 2015-05-25.

Sign up to request clarification or add additional context in comments.

Comments

0

You can use the "Advanced" button while importing to change how Access checks the date from your source file. Set the delimiter as " " and check if your date format is correctly set to "DMY" and "4 digit year" is unchecked. Hope this solves the issue, did so for me.

Comments

0

Also had the problem with csv file import. My work around invoked setting the date delimiter as a hyphen instead of forward slash. I notice this discrepancy whilst testing imports via setting the field type as text.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.