Hi
I get error - DateTime StartDate = Convert.ToDateTime(colum[1].ToString());
Below is the Data
| 1422 | 04/30/2023 | 04/30/2023 11:00 |
| 1422 | 05/01/2023 | 05/01/2023 11:00 |
Thanks
Hi
I get error - DateTime StartDate = Convert.ToDateTime(colum[1].ToString());
Below is the Data
| 1422 | 04/30/2023 | 04/30/2023 11:00 |
| 1422 | 05/01/2023 | 05/01/2023 11:00 |
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Aman GuptaPosted May 1, 2023, 3:04 AM
Hello,
You can't convert it directly, you have to Parse the date in sting to get the result in date format.
You can use it like this,
Date date = DateTime.Parse(dateString);