title: best solution for Null DateTime value
body: <p>I couldn't find best solution when DateTime value is NULL.</p>
  
  <p>I use this techinque When binding;</p>
  
  <pre><code>_ACTIVATION_DATE = dt.Rows[0]["ACTIVATION_DATE"] == DBNull.Value ? new DateTime(1970, 12, 30) : (DateTime?)dt.Rows[0]["ACTIVATION_DATE"];
  </code></pre>
  
  <p>When Inserting;</p>
  
  <pre><code>public void Insert()
  {
      string ad="";
      string dd="";
  
      if (ACTIVATION_DATE == null)
          ad = "null";
      else
          ad = "'" + ACTIVATION_DATE + "'";
      if (DEACTIVATION_DATE == null)
          dd = "null";
      else
          dd = "'" +DEACTIVATION_DATE +"'";
  
      string sSQL = "INSERT INTO LINE_INFO (ACTIVATION_DATE,DEACTIVATION_DATE,STATUS,PO,NOTES) VALUES (" + ad + "," + dd + "," + _STATUS.ToString() + "," + _PO.ToString() + ",'" + _NOTES.ToString() + "');SELECT @@IDENTITY AS LASTID";
      }
  </code></pre>
  
  <p>Variables;</p>
  
  <pre><code>DateTime? ACTIVATION_DATE;
  DateTime? DEACTIVATION_DATE;
  </code></pre>
  
  <p>What is the smart way to handle Null DateTime values?</p>
  
  <p>When I find the solution I will write an article about this topic.</p>