Posted on: 8/26/2013 9:26:24 PM | Views : 605

I have a CSV file which contains a column with Date(Column name: Date, data like 20130826). The database has a table  which contains all columns of CSV file and there is a date field (smalldatetime) in database. 
first, I read file and then put the data into a DataTable. and then copy datatable data into database using sqlbulkcopy. But it throws an exception:
String was not recognized as a valid DateTime
How can I solve this problem?
Thanks.
...

Go to the complete details ...