Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Type conversion failure in Access 2013

When importing data from a text file (csv) into MS Access, I get an error "Type conversion failure" for 1 field. The field has data with date format "yyyy-mm-dd hh:nn:ss" and Access simply refuses to recognise it and places #Num! or simply blank data. The csv file is huge with 8m rows and cannot be opened in Excel to edit the date format. Facing no problems with any other fields.Anyway to avoid this error?

like image 599
Siddd Avatar asked Jun 05 '15 07:06

Siddd


People also ask

What is type conversion failure in access?

Type conversion failures You may be trying to append data of one type into a field of another type. For example, appending text into a field whose data type is set to Number will cause the error to appear.

Why is there Import error in access?

The problem mainly occurs when the cells contain data above 8224 bytes. Take a look over the error that displayed during MS Access error importing excel file. Import Error: The wizard is unable to access information in the file '<filename>'. Please check that the file exists and is in the correct format.


1 Answers

Use the Advanced... button at the field specification step of the import and try these settings:

enter image description here

I don't have the exact date format in the picture above, but it is just to show how to import that specific date.

Date Order should be YMD because in your dates, you have the years coming first, followed by the month and the date.

The date delimiter for your csv will be a dash -, while the time delimiter should be the default colon :. Make sure the 4 digit years checkbox is checked, and I would also check the Leading Zeros in Dates checkbox since your month and dates are in mm and dd formats respectively (i.e. they will begin with 0 if it is a single digit).

If there are problematic dates from your csv now, then this is another problem that won't be easy to tackle. You will maybe have to correct the date manually from the csv before importing it, or import the date as text and then create a new column to manipulate the text dates to date fields (and fix any problematic dates there).

like image 101
Jerry Avatar answered Nov 15 '22 07:11

Jerry