title: Query mongo on timestamp
body: <p>I want to query Mongo based on timestamp. Follwing is the field in mongo.</p>
  
  <pre><code>"timestamp" : "2016-03-07 11:33:48"
  </code></pre>
  
  <p>Books is the collection name and below is my query for time period of 1 minute:</p>
  
  <pre><code>db.Books.find({"timestamp":{$gte: ISODate("2016-03-07T11:33:48.000Z"), $lt: ISODate("2016-03-07T11:34:48.000Z")}})
  </code></pre>
  
  <p>Also is there any alternative like I don't have to give greater and lower limit on timestamp. But query based time interval mentioned. Something like, if present timestamp is TS = "2016-03-07T11:33:48.000Z" then query should be between TS and TS + 1 minute rather than explicitly mentioning timestamp. Something like adding 1 minute to present timestamp</p>