Sonali Avhad

Sonali Avhad

  • NA
  • 234
  • 39.7k

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

Nov 25 2020 11:10 PM
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)