title: SqlDateTime overflow exception (yyyy-mm-dd to sqldatetime)
body: <p>I'm extracting a date-formatted string (yyyy-MM-dd) and then converting it to a <code>DateTime</code> and inserting it in the database using a storedprocedure. But I keep getting </p>
  
  <p><code>System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.</code></p>
  
  <p>The column in my table is of type <code>date</code>.</p>
  
  <p>I convert my string (e.g <code>2016-01-15</code>) by invoking <code>DateTime.ParseExact(expirationDate, "yyyy-MM-dd", null)</code> and then I take that value and insert it as a parameter into my StoredProcedure and execute the proc.</p>
  
  <p>But when using the debugger I can see that the return value is actually a <code>yyyy-MM-dd HH:mm:ss</code>-formatted DateTime.</p>
  
  <p>this is an example of how the code looks like</p>
  
  <pre><code>string expirationDate = GetDate();
  DateTime date = DateTime.ParseExact(expirationDate, "yyyy-MM-dd", null);
  
  ExecuteMyStoredProc(date);
  </code></pre>