title: Cast string to date and change year 0001 to 1900
body: <p>I receive a string with following value:</p>
  
  <pre><code>0001-01-01T12:30:00
  </code></pre>
  
  <p>I only need the time portion when saving to the database.</p>
  
  <p>But I can't save <code>0001</code> year in <strong>MSSQL Server</strong> (field is <code>SmallDateTime</code> type) as it requires <strong>1900+</strong>.</p>
  
  <p>Currently I check what the year is and recreate the date using the following code:</p>
  
  <pre><code>...
  DateTime i = Convert.ToDateTime("0001-01-01T12:30:00");
  DateTime d = new DateTime(1900, 1, 1, i.hour, i.minute, i.seconds);
  </code></pre>
  
  <p>Is there an easier way to use a date format where year is set to 0001?</p>
  
  <p>I don't know all of the fields I'm importing that might have this value and I don't want to add this code for all of the fields.</p>