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.
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.
Rafnas T PPosted Jan 31, 2017, 5:36 AM
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
Nitin SontakkePosted Jan 4, 2017, 9:07 AM
Dinesh SanthalingamPosted Jan 4, 2017, 6:04 AM
Vineet KumarPosted Jan 4, 2017, 5:26 AM
Mangesh GPosted Jan 4, 2017, 2:46 AM
string sss = Convert.ToDateTime("12/30/2016 1:00:00 PM").ToString("dd/MM/yy hh:mm tt");
Nitin SontakkePosted Jan 4, 2017, 2:23 AM
Dinesh SanthalingamPosted Jan 4, 2017, 2:23 AM
Nitin SontakkePosted Jan 4, 2017, 2:20 AM
Dinesh SanthalingamPosted Jan 4, 2017, 2:20 AM
Nitin SontakkePosted Jan 4, 2017, 2:17 AM