title: MVC Handle Null Date from View to Controller
body: <p>I have an MVC View which has an <em>optional</em> <code>&lt;input /&gt;</code> for a Date.<br>
  The Model (Generated from a DB) has the <code>DateTime</code> field as <code>Not Null</code></p>
  
  <p>If the user decides to leave the field blank, the <code>View</code> will get passed back to the <code>Controller</code>, which will then validate everything and save it away to a DB.</p>
  
  <p>The issue comes in where the <em>null</em> value being passed back is either <code>1900-01-01 12:00:00 PM</code> OR <code>DateTime.Min</code>, depending on the server (Right now two different Dev machines).</p>
  
  <p>The <code>Min Date</code> needed in the DB is <code>1900-01-01 12:00:00 PM</code>, so to circumvent this, I have the following check:</p>
  
  <pre><code>person.PaidDate = person.PaidDate == DateTime.MinValue || person.PaidDate == DateTime.Parse("1900-01-01 12:00:00 PM") ? DateTime.Parse("1900/01/01 12:00:00") : person.PaidDate;
  </code></pre>
  
  <p>Is this the best, or most correct way of checking for a <em>supposedly null</em> date being brought back from the <code>Controller</code> ?</p>