I am trying to convert the value of raddatepicker to YYYY-MM-DD format. But I am getting exception,
orderDate.SelectedDate = DateTime.Now.Date; // Date = {15/7/2015 12:00:00 AM}
string orderDate_ = orderDate.SelectedDate.Value..ToShortDateString(); // 15/7/2015
IFormatProvider culture = new CultureInfo("en-US", true);
DateTime dateVal = DateTime.ParseExact(orderDate_, "yyyy-MM-dd", culture); // geting exception [System.FormatException] = {"String was not recognized as a valid DateTime."}
Getting exception
[System.FormatException] = {"String was not recognized as a valid DateTime."}
Please suggest how to convert the date format to yyyy-MM-dd.