title: Checking if a datatable column has value or not in C#
body: <p>This is my datatable</p>
  
  <pre><code>DataTable get_order_info = objDUT.GetDataTable("select * from investment_orders where order_id =" + dr["order_id"]); 
  </code></pre>
  
  <p>In this datatable there is a column <code>added_date</code>.</p>
  
  <p>I want to apply my method if the column <code>added_date != null</code></p>
  
  <p>I have written this code :</p>
  
  <pre><code>if (get_order_info.Columns.Contains("added_time") != null)
  {
      var secondsSince1970 = DateTime.Now - DateTime.Parse("01.01.1970 00:00:00");
      difference = Convert.ToInt64(secondsSince1970.TotalSeconds) - Convert.ToInt64(get_order_info.Rows[0]["added_time"]);
  }
  else
  {
      Label1.Text = "fail";
  }
  </code></pre>
  
  <p>but it is showing an error </p>
  
  <blockquote>
    <p>Input string was not in a correct format</p>
  </blockquote>
  
  <p>Please help me. </p>