title: Error :String was not recognized as a valid DateTime (Formating) in C# 4
body: <p>I have a datepicker in my c# application that provide strings like these:</p>
  <blockquote>
  <p>&quot;2016/1/1&quot;</p>
  <p>&quot;2016/11/15&quot;</p>
  </blockquote>
  <p>But I want to change them to these formats:</p>
  <blockquote>
  <p>&quot;2016/01/01&quot;</p>
  <p>&quot;2016/11/15&quot;</p>
  </blockquote>
  <p>I use this code:</p>
  <pre><code>    string searchstring = &quot; and ProductStartDate Between '&quot; + 
      String.Format(&quot;{0:yyyy/MM/dd}&quot;, Convert.ToDateTime(calender_from.Text)) + 
      &quot;' and '&quot; + 
      String.Format(&quot;{0:yyyy/MM/dd}&quot;, Convert.ToDateTime(calender_to.Text)) + &quot;'&quot;;
  </code></pre>
  <p>but when I run following error occurs :</p>
  <blockquote>
  <p>An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll</p>
  <p>Additional information: String was not recognized as a valid DateTime.</p>
  </blockquote>
  <p>Any idea?</p>