I'm trying to update tables from a CSV file when my db opens using:
The CSV file includes a couple of date fields that I've set as date/time in the spec file but I get a type conversion failure every time. The format in the CSV file is hh:mm dd/mm/yy and if I open it in Excel and format it first it works fine. To complicate it some of the records just hold 00:00 if there's no value in the system it's generated by.
Unfortunately I can't get the format of the CSV file changed and I need them as dates so I can use them in a query to calculate elapsed time. Has anyone got any suggestions?
Thanks, Alison.
Code:
DoCmd.TransferText acImportDelim, "MPAN", "MPAN Details", strFile, -1
The CSV file includes a couple of date fields that I've set as date/time in the spec file but I get a type conversion failure every time. The format in the CSV file is hh:mm dd/mm/yy and if I open it in Excel and format it first it works fine. To complicate it some of the records just hold 00:00 if there's no value in the system it's generated by.
Unfortunately I can't get the format of the CSV file changed and I need them as dates so I can use them in a query to calculate elapsed time. Has anyone got any suggestions?
Thanks, Alison.