title: find by today's date using spring data either @Query in mongorepository or Mongooperations or mongotemplate
body: <p>I'm trying to fetch all records those have been created on today's date from mongodb using mongorepository or mongooperations or mongotemplate I want to match all records by Date only not on timestamps. Please refer my mongodb enteries below.</p>
  
  <pre><code>/* 1 */
  {
  "_id" : ObjectId("59135f13fc90f22b00c91df2"),
  "_class" : "com.vistors.management.domains.EmployeeVisitor",
  "checkedIn" : true,
  "checkedInDate" : ISODate("2017-05-10T18:42:27.630Z"),
  "visitor" : {
      "$ref" : "VISITOR",
      "$id" : ObjectId("59135f13fc90f22b00c91def")
  },
  "employee" : {
      "$ref" : "EMPLOYEE",
      "$id" : ObjectId("59135f13fc90f22b00c91df0")
  }
  }
  
  /* 2 */
  {
  "_id" : ObjectId("59135f13fc90f22b00c91df3"),
  "_class" : "com.vistors.management.domains.EmployeeVisitor",
  "checkedIn" : true,
  "checkedInDate" : ISODate("2017-05-10T18:42:27.638Z"),
  "visitor" : {
      "$ref" : "VISITOR",
      "$id" : ObjectId("59135f13fc90f22b00c91dee")
  },
  "employee" : {
      "$ref" : "EMPLOYEE",
      "$id" : ObjectId("59135f13fc90f22b00c91df0")
  }
  }
  
  /* 3 */
  {
  "_id" : ObjectId("5913ec9eafeb7a1e8df79d5f"),
  "_class" : "com.vistors.management.domains.EmployeeVisitor",
  "checkedIn" : true,
  "checkedInDate" : ISODate("2017-05-11T04:46:22.425Z"),
  "visitor" : {
      "$ref" : "VISITOR",
      "$id" : ObjectId("59135f13fc90f22b00c91dee")
  },
  "employee" : {
      "$ref" : "EMPLOYEE",
      "$id" : ObjectId("59135f13fc90f22b00c91df0")
  }
  }
  </code></pre>
  
  <p>I want to fetch all enteries from db those match with checkedInDate as today's date something like:</p>
  
  <pre><code>@Query("{'checkedInDate': {$gte: ?0, $lte:?0 }}")
  List&lt;EmployeeVisitor&gt; findAllCheckedInToday(ZonedDateTime date)
  </code></pre>
  
  <p>or </p>
  
  <pre><code>@Override
  public List&lt;EmployeeVisitor&gt; getTodayRecords() {
  
  //Date date = Date.from(instant);
  
      Query query = new Query().addCriteria(Criteria.where("checkedInDate").is(new Date()));
      return mongoTemplate.find(query, EmployeeVisitor.class);
  
      //Criteria.where("expenseDate").gte(calendar1.getTime()).lte(calendar2.getTime()).and("userid").is(uid);}
  }
  </code></pre>
  
  <p>But I'm failed to achieve the required result, I'm not able to understand how can I query from db with date not date with timestamp.</p>
  
  <p>Thanks for your help.</p>
  
  <p>Jitender </p>