title: Manually change DateTime asp.net
body: <p>When I see the date coming in from my calendar  asp:calendar  I see that it is</p>
  
  <pre><code>Date = {9/25/2015 12:00:00 AM}
  </code></pre>
  
  <p>So setting the datetime like this works</p>
  
  <pre><code>DateTime date = new DateTime(Convert.ToDateTime(Calendar1.SelectedDate).Year, Convert.ToDateTime(Calendar1.SelectedDate).Month, Convert.ToDateTime(Calendar1.SelectedDate).Day);
  </code></pre>
  
  <p>However I have a variable that is a string </p>
  
  <pre><code>string myDate = "9/25/2015" 
  </code></pre>
  
  <p>I thought that I should be able to do this</p>
  
  <pre><code>DateTime date = new DateTime(myDate  + " 12:00:00 AM");
  </code></pre>
  
  <p>That gives error about cannot convert string to long</p>