title: mongodb c++ query for a day range
body: <p>I have a structure like this:</p>
  
  <pre><code>{
      "_id" : ObjectId("562dcec2430a5684fedce1b0"),
      "date" : ISODate("2015-10-26T06:57:06.619Z"),
      "query" : "google com"
  }
  </code></pre>
  
  <p>how can I filter queries those dates are 2015-10-25?
  or If I would like to filter queries those are asked by a day ago, is there a c++ expression like this:</p>
  
  <pre><code>auto_ptr&lt;DBClientCursor&gt; cursor =
    mongo_conn-&gt;query("database1.collection1",
                      BSON("date" &lt;&lt;
                        BSON("$gte" &lt;&lt; BSON(datenow - "1 day")
                        &lt;&lt; "$lt" &lt;&lt; BSON(datenow))));
  </code></pre>
  
  <p>Thanks very much!!</p>