CSV IMPORT problem Please HELP

  • Thread starter Thread starter dskpgt
  • Start date Start date
D

dskpgt

Hi

I have to Import some date values from a CSV file in to ACCESS 2003 .
the Data in the CSV files as


5/11/2006,10:14:52,89127,0,Hu,VID,Success,1,64,56,K,250,*
5/10/2006,07:39:31,9,0,Nabeel,VID,Failure,0,17,64,K,250,*
5/ 9/2006,20:12:55,86411,0,Muni,VID,Success,1,75,76,K,250,*
5/ 8/2006,08:22:13,10,0,Faqir,VID,Success,1,99,52,K,250,*

like that But the records on 5/11/2006 and 5/10/2006 are easily
imported in to access.
but 5/ 9/2006 & 5/ 8/2006 are not importing.

in report error table shows that Data type conversion error

why this happens?

In VB it also shows NULL in field of Date on particular recordset

waiting for Urgent reply

Thanking You

DAs
 
The import routine recognises this "5/9/2006" and this "5/09/2006" as valid
dates, but not this "5/ 9/2006".

You need to dispose of the space, or replace it with a 0. You can do this
before importing, e.g. with this command (if Perl is installed on your
machine)

perl -ibak -pe" s!/ (\d/)!/0$1!" "D:\folder\filename.csv")

or with your favourite programming or scripting language, or even with
Word's find-and-replace. Or you can import the data using a text field
instead of a date field, and then use an update query to fix the " " and put
the values in a date field.
 
Back
Top