Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.9k

String was not recognized as a valid DateTime

Apr 18 2023 3:35 PM

Hi

  I have below code . I am getting above error on - DateTime StartDate = Convert.ToDateTime(colum[1].ToString());

I have below data in xls file. I am trying to Upload. I am using SQl. Datatype is date

MentorID	Date	StartTime
1422	04-19-2023	2023-04-19 11:00:00
1422	04/21/2023	2023-04-21 11:00:00

Thanks


Answers (6)