How do i convert string 2018-05-10T14:29:00 to MM/dd/yyyy
I need to convert 2012-01-12T14:29:00 to MM/dd/yyyy hh:mm:ss date string format. How do i do it ?
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 attend4days leftRegister
Nitin SontakkeRank #264 · 9.6K reputationPosted May 10, 2018, 5:21 PM EDT
Istudent RanaRank #4,270 · 354 reputationPosted May 11, 2018, 9:51 AM EDT
string formattedDate = date.ToString("MM/dd/yyyy HH:mm:ss");
Message=String was not recognized as a valid DateTime.
Istudent RanaRank #4,270 · 354 reputationPosted May 11, 2018, 10:04 AM EDT
DateTime dtObject = dto.DateTime;
string result= dto.ToString("MM/dd/yyyy HH:mm:ss");
Nitin SontakkeRank #264 · 9.6K reputationPosted May 11, 2018, 5:21 PM EDT