title: Date read from Database in wrong format?
body: <p>I'm using <code>DateTime</code> in my C# winforms tool, and I'm storing dates into an SQL database using this line:</p>
  
  <p><code>iDisc.acquirementDate.ToString("yyyy-MM-dd")</code></p>
  
  <p>The SQL database field is of <code>DATE</code> type, and when this date is stored, its stored correctly, such as this: <code>2013-03-14</code></p>
  
  <p>When I want to the value, I use this line:</p>
  
  <pre><code>DateTime acquirementDate = DateTime.ParseExact(iDiscRow[TableNames.Discs.acquirementDate].ToString(), "yyyy-MM-dd", CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>However, a FormatException occurs at the above line, because the string being parsed is not a valid DateTime complaint string.</p>
  
  <p>The value this is being parsed is the this: <code>3/14/2013 12:00:00 AM</code></p>
  
  <p>What I don't understand is, why is the value read as <code>3/14/2013 12:00:00 AM</code>, when in the database its stored as <code>2013-03-14</code> ?</p>
  
  <p>I'm using <code>SqlDataReader</code> to retrieve the data from database. Can post that code here, but I don't think its needed as its very basic.</p>