title: How to select date from datetime column?
body: <p>I have a column of type "datetime" with values like 2009-10-20 10:00:00</p>
  
  <p>I would like to extract date from datetime and write a query like:</p>
  
  <pre><code>SELECT * FROM 
  data 
  WHERE datetime = '2009-10-20' 
  ORDER BY datetime DESC
  </code></pre>
  
  <p>Is the following the best way to do it?</p>
  
  <pre><code>SELECT * FROM 
  data 
  WHERE datetime BETWEEN('2009-10-20 00:00:00' AND '2009-10-20 23:59:59')
  ORDER BY datetime DESC
  </code></pre>
  
  <p>This however returns an empty resultset. Any suggestions?</p>