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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Aman GuptaRank #193 · 12.4K reputationPosted Apr 30, 2023, 11:04 PM EDT
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);