How to convert 04/09/2013 8:09:10 PM to 09/04/2013 (MM-dd-yyyy). I tried to convert but it is taking 09 as date and 04 as month.
Please help
[HttpPost]
public string getdailynote(DateTime selectedDate)
//selectedDate gets date as 04/09/2013 8:09:10 PM
{
string x = selectedDate.ToString("MM-dd-yyy", CultureInfo.InvariantCulture);
string daily;
DateTime dt = Convert.ToDateTime(x);
//dt gets value as {09/04/2013 12:00:00 AM} but 09 as date and 04 as month
Dnote.RealDate =dt;
daily = _scheduler.GetDailyNote(Dnote);
return daily;
}