title: How to insert null value into DateTime column?
body: <p>I am trying to store a null value into a <code>DateTime</code> column. My code is like below:</p>
  
  <pre><code>protected void btnInsert_Click(object sender, EventArgs e)
  {
      try
      {
          ChangeModule cm = new ChangeModule();
          cm.CR_REF_NO = txtCRRefNumber.Text.Trim();
          cm.SLA_DELIVERY_DATE_WAIVER = DateTime.ParseExact(txtSLADeliveryDateWaiver.Text, "dd/MM/yy", null);
          else /*This else part is causing problem since I assigned null*/
               cm.SLA_DELIVERY_DATE_WAIVER = null;
      }
      catch (Exception ex)
      {
         throw ex;
      }
  }
  </code></pre>
  
  <p>Code is working fine as long as a proper date exists in SLA_DELIVERY_DATE_WAIVER, but throwing error when there is the blank textbox.</p>