title: Which is the best way to check if timestamp/datetime belongs to a specified date
body: <p>Sometimes I have a datetime or timestamp columns in the database and, for example, I need to select all records with timestamp updated today.</p>
  
  <p>I usually do it like this:  </p>
  
  <pre><code>SELECT * FROM mytable WHERE CAST(TS AS DATE) = CURDATE();  
  SELECT * FROM mytable WHERE CAST(TS AS DATE) = '2009-11-01';
  </code></pre>
  
  <p>Also, it's possible to use DATE() function instead of cast:  </p>
  
  <pre><code>SELECT * FROM mytable WHERE DATE(TS) = CURDATE();
  </code></pre>
  
  <p>The question is which way is more correct and faster? Because I'm not sure CAST for all records is a very good idea, maybe there is a better way...</p>