I have two columns named exam_date (string nvarchar) and submitted_date(Date Time). The exam_date will always be "dd-MM-yyyy" format.Now I want to insert exam_date to submitted date. How is it possible?
I have tried like below but shows "String was not recognized as a valid DateTime."
You can use
DateTime submittedDate = DateTime.ParseExact("12-04-2016", "dd-MM-yyyy", null);
But you should really change the column
exam_date to a
datetime and not a