excel file to access

ponneri

Registered User.
Local time
Tomorrow, 04:17
Joined
Jul 8, 2008
Messages
102
Hi All.

I have an excel file that needs to be imported into access.

I get error when importing as one column is general type in excel, but stores mostly date values ( in dd-mmm-yyyy format.) Some of the records in that column in excel have text values like "till delivery date", "upto warranty" etc... instead of dates which is a big headache.

12-jun-17
29-sep-16
till delivery
15-oct-12
13-mar-16

How do i import into access all records as text and then use the date part in queries in access as "till delivery" needs to be printed as it is; if date does not exist.

Hope I'm clear.

Any help appreciated.
 
If you are doing it manually, you can save an import specification on your first import. At that time you would specify the column type to be text not date.
 
Use Cstr([fieldname]) to force import as a text string

Then when running a query do something like

Code:
 if IsDate([fieldname]) Then
...
Else
..
End If
 
Hi All.

Thanks for the replies.

Will try and see. :)
 
@Ridders: thanks for your advice. I faced the same issue. This solved
 

Users who are viewing this thread

Back
Top Bottom