Reputation: 29064
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.
Upvotes: 0
Views: 3234
Reputation: 1
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.
Upvotes: 0
Reputation: 284
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.
Upvotes: 0
Reputation: 55806
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.
Upvotes: 1