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.
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
Khargesh RajputRank #616 · 3.9K reputationPosted May 1, 2015, 3:47 AM EDT
Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted May 1, 2015, 3:59 AM EDT
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.
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 1, 2015, 5:20 AM EDT
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);
}
Abhay ShankerRank #375 · 6.7K reputationPosted May 1, 2015, 11:19 AM EDT
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