title: MySQL DATETIME DIFF query
body: <p>I have a MySQL query that runs via cron every 30 minutes to delete old property listings, the query is:</p>
  
  <pre><code> DELETE FROM $wpdb-&gt;posts WHERE post_type = 'rentals' AND DATEDIFF(NOW(), post_date_gmt) &gt;=2  
  </code></pre>
  
  <p>right now its in a testing phase and set to delete when the listing is 2 days old, this it does without a problem, the problem that i do have is that i need it to recognise the time from when the listing was posted and the time to when it should be deleted,  </p>
  
  <p>Basically the table column of <code>post_date_gmt</code> is in the format of <code>2011-05-26 13:10:56</code> and the column type is <code>DATETIME</code> when i have the <code>DATEDIFF (NOW()</code> query running it needs to be equal to 48 hours or more from current time to delete the listing, this is not happening, the query just seems to say "this is the 2nd day, delete listing" so it gets deleted and this could be when just 24 and a half hours old, how can i make it go the full exact 48 hours?</p>
  
  <p>Regards</p>