I have a date
date time from=12/30/2016 12:00:00 AM
I want to convert it into 30/12/2016 12:00:00 AM
do some needful.
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
Mangesh GRank #294 · 8.6K reputationPosted Jan 3, 2017, 9:46 PM EST
string sss = Convert.ToDateTime("12/30/2016 1:00:00 PM").ToString("dd/MM/yy hh:mm tt");
Nitin SontakkeRank #264 · 9.6K reputationPosted Jan 3, 2017, 9:17 PM EST
Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 3, 2017, 9:20 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Jan 3, 2017, 9:20 PM EST
Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 3, 2017, 9:23 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Jan 3, 2017, 9:23 PM EST
Vineet KumarRank #3,087 · 464 reputationPosted Jan 4, 2017, 12:26 AM EST
Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 4, 2017, 1:04 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Jan 4, 2017, 4:07 AM EST
Rafnas T PRank #280 · 8.8K reputationPosted Jan 31, 2017, 12:36 AM EST
DateTime datetimeDate = Convert.ToDateTime(d1.ToString("MM/dd/yyyy")); // here will get november month this is wrong when you will get error when DateTime d1 = Convert.ToDateTime("25 / 12 / 2016"); day field is more than 12
string stringdate= d1.ToString("MM/dd/yyyy"); //here same and output will be 12 / 111 / 2016