title: How to get the previous day records from mysql table?
body: <p>I am trying to fetch previous day records from table but I am not finding how to do it exactly. Need your help please..</p>
  
  <p>Table: RECORD_DATA</p>
  
  <pre><code>id       creationDate    
  1   | 2013-05-03 04:03:35 |    
  2   | 2013-05-03 04:03:35 | 
  </code></pre>
  
  <p>Now I need to get all the records that were created on 2013-05-03. Time can be anything. So my query should have LIKE operator.</p>
  
  <p>I am using below query and it gives me empty set.</p>
  
  <pre><code>select creationDate from RECORD_DATA 
  where creationDate LIKE DATE_SUB(STR_TO_DATE('2012-04-05','%d/%m/%Y'),INTERVAL 1 DAY);
  </code></pre>