title: Comparing dates in MySQL ignoring time portion of a DateTime field
body: <p>I need to compare dates in MySQL ignoring the time portion in a <code>DateTime</code> column. I have tried the following SQL.</p>
  
  <pre><code>SELECT * FROM order_table where order_date=date_format('2012-05-03', '%Y-%m-%d');
  </code></pre>
  
  <p>It doesn't retrieve any row even though there is a date <code>2012-05-03 10:16:46</code> in MySQL table. How can the time portion in the <code>DateTime</code> field be ignored while comparing dates in MySQL?</p>