title: How do you execute java queries based on ObjectID.timestamp?
body: <p>How do you query time based queries from the ObjectID.timestamp()?</p>
  
  <pre><code>db.myCollectin.findOne()._id.getTimestamp()
  </code></pre>
  
  <p><strong>I've tried</strong></p>
  
  <pre><code>Date date = new Date();
  BasicDBObject query = new BasicDBObject("timestamp", new BasicDBObject("$lt", date);
  myCollection.findOne(query);
  </code></pre>
  
  <p><strong>Problem:</strong></p>
  
  <p>Doesnt work</p>