convert date dd/MM/yyyy to MM/dd/yyyy
how we can change datetime format dd/MM/yyyy to MM/dd/yyyy in asp.net
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.
Abhay ShankerPosted May 1, 2015, 3:19 PM
http://forums.asp.net/t/1148544.aspx?How+to+convert+Date+format+from+dd+MM+yyyy+to+mm+dd+yyyy+in+asp+net
http://www.dreamincode.net/forums/topic/38509-how-to-convert-textbox-value-date-from-ddmmyyyy-to-mmddyyyy-in-vb/
http://www.codeproject.com/Questions/478996/changingplusdateplusformatplusfromplusdd-fMM-fyy
you can also try as below
Vincent Maverick DuranoPosted May 1, 2015, 9:20 AM
string sDate = "5/1/2015";
DateTime dDate;
string newDateFormat = String.Empty;
if (DateTime.TryParseExact(sDate , "dd/MM/yyyy", null, DateTimeStyles.None, out dDate)){
newDateFormat = string.Format("{0:MM/dd/yyyy}", dDate);
}
Afzaal Ahmad ZeeshanPosted May 1, 2015, 7:59 AM
string friendDate = Convert.ToDateTime("
You can use the ToString function to pass the format that you want the object to take. It can be applied to integers, date and time and all other objects which support the formatting.
Khargesh RajputPosted May 1, 2015, 7:47 AM