title: How compare date in spring mongo
body: <p>I want to fetch result bw two date in Mongo and spring but it show parse exception.</p>
  
  <p>If I pass like date as string then no result. How compare date in spring and Mongo application.</p>
  
  <pre><code>Aggregation.match(Criteria.where("date").gte(new Date("2018-06-24")).lte(new Date("2018-06-30")));
  </code></pre>
  
  <p>My collection:</p>
  
  <pre><code>{
      "_id" : ObjectId("5b34a31a68f1b041aa13b82f"),
      "date" : ISODate("2018-06-28T00:00:00Z"),
      "eventname" : "app open"
  }
  </code></pre>