title: convert datetime to yyyy/MM/dd
body: <p>How can I convert a datetime object to the format yyyy/MM/dd? I am trying this:</p>
  
  <pre><code>DateTime selectedDate =Convert.ToDateTime( Calendar1.SelectedDate.ToShortDateString());
  selectedDate = DateTime.ParseExact(selectedDate, "yyyy/MM/dd", CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>But I get the following errors: </p>
  
  <blockquote>
    <p>The best overloaded method match for 'System.DateTime.ParseExact(string, string, System.IFormatProvider)' has some invalid arguments  </p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>Argument '1': cannot convert from 'System.DateTime' to 'string'</p>
  </blockquote>