4
Answers

how to give date format for datacolumn of datatable in asp.net

I am saving csv file data in sql database table using asp.net. In csv file there is date column and at the time of saving it giving error that " String was not recognized as a valid DateTime".
In CSV file Date is in "dd/MM/yyyy" and
in sql database table that date has datetime format.
In code
new DataColumn("TDATE",typeof(DateTime)),

Please help me in this
Answers (4)