title: Select all records between two datetime format
body: <p>I have this query, i need to select all records between two dates, the mysql table is a datetime format.</p>
  
  <p>I tried this but it didn't work.</p>
  
  <pre><code>select * from cdr
   WHERE calldate BETWEEN '2012-12-01' AND '2012-12-03';
  </code></pre>