title: How to compare date without time in mongodb
body: <p>I want to compare 2 iso dates using only the day without time, in Mongo DB. I want this query just like SQL.</p>
  <pre><code>select * from data where DATE_FORMAT(&quot;data.effectivestartdate&quot;, &quot;%Y-%m-%d&quot;)
   &lt; DATE_FORMAT(&quot;2018-11-13T23:59:59+05:30’&quot;, &quot;%Y-%m-%d&quot;);
  </code></pre>
  <p>How can I write this query in Mongo DB?
  Kindly modified this query.</p>
  <pre><code>db.entityrecord.find({
   &quot;data.effectivestartdate&quot;: { &quot;$lte&quot;: ISODate(&quot;2018-11-13T23:59:59+05:30&quot;) })
  </code></pre>