in my textbox textformat is dd-MM-yyyy
i want to convert it to datetime
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
Deepak SainiRank #2,411 · 586 reputationPosted Sep 24, 2015, 11:45 PM EDT
Susanta RoutRank #1,556 · 1K reputationPosted Sep 25, 2015, 12:44 AM EDT
Deepak SainiRank #2,411 · 586 reputationPosted Sep 25, 2015, 1:00 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Sep 25, 2015, 1:14 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Sep 25, 2015, 1:30 AM EDT
DateTime dt = DateTime.ParseExact("24-01-2013", "dd-MM-yyyy", CultureInfo.InvariantCulture);