title: How to use SQL Query to get values from database using <= operator?
body: <p>I have the following query :</p>
  
  <pre><code> "C_START&gt;= '01/01/0001 06:00:00 PM' AND C_END &lt;= '01/01/0001 08:00:00 PM'"
  </code></pre>
  
  <p>Where <code>C_START</code> and <code>C_END</code> are the column names of the <code>DataTable</code>.</p>
  
  <p>Now I'm passing this query as:</p>
  
  <pre><code>public static DataTable getval(query, dt)
  {
      DataTable myTable = new DataTable();
      myTable = dt.Clone();
      DataRow[] dr = dt.Select(query);
      if (dr.Length &gt; 0)
      {
         foreach (DataRow r in dr)
         {
            myTable.Rows.Add(r.ItemArray);
         }
      }
      return myTable;
  }
  </code></pre>
  
  <p>ON displaying this <code>myTable</code> in my <code>GridView</code>, I can see the list of all records for which C_START is greater than or equal to 6 PM. There is something wrong in C_END. It shows all records including those whose C_END value is greater than 8 PM which is wrong as per the query passed. Please suggest how to eliminate this issue.</p>