title: Compare 2 dates in mongo find method
body: <p>I have mongo documents containing a last_active date and a created date. I would like to search for all documents where the <strong>day</strong> of last_active is not equal to the <strong>day</strong> of created, but I have no clue how to write the query.</p>
  
  <p>In MySQL I would write it like that:</p>
  
  <pre><code>WHERE DATE_FORMAT(created, '%Y-%m-%d') != DATE_FORMAT(last_active, '%Y-%m-%d')
  </code></pre>