title: MongoDB Date Comparison Issues
body: <p>Using Mongoose I am trying to select data from my database based on a date. In my case any account that hasn't been accessed in over an hour.</p>
  
  <p>I am not getting any results when running the query:</p>
  
  <pre><code>db.accounts.findOne( { "last_used": { "$lte": "2016-05-26T09:31:08.480Z" }} )
  </code></pre>
  
  <p>Here's my code:</p>
  
  <p><strong>bin/App.js</strong></p>
  
  <pre><code>import AccountModel from '../Models/Account';
  
  let lastHour = new Date();
  lastHour.setHours(lastHour.getHours() - 1);
  
  let query = {
      "last_used": {
         "$lte" : ISODate(lastHour)
      }
  };
  
  // Get account that was last used at least an hour ago
  AccountModel.findOne(query, function(err, account) {
      if(err) throw new Error(err);
      console.log(account);
  });
  </code></pre>
  
  <p><strong>Models/AccountModel.js</strong></p>
  
  <pre><code>import Mongoose from 'mongoose';
  
  export default Mongoose.model( 'Account', new Mongoose.Schema({
    email: { type: String, required: true, unique: true },
    password: { type: String, required: true },
    username: { type: String, required: true, unique: true },
    date_added: { type: Date, default: Date.now },
    last_used: { type: Date, default: Date.now } }
  ));
  </code></pre>
  
  <p><strong>db.accounts.find()</strong></p>
  
  <pre><code>{ 
      "_id" : ObjectId("574555d0348bc17a1ab67f2c"),
      "username" : "testuser",
      "email" : "testuser@mydomain.com",
      "password" : "SOMEHASH",
      "last_used" : ISODate("2016-05-24T08:13:41.080Z"),
      "date_added" : ISODate("2016-05-24T07:35:44.121Z"),
      "__v" : 0
  }
  </code></pre>
  
  <p>The first query should be pulling the result above because it was last accessed over an hour ago.</p>
  
  <p>Any ideas on were I'm going wrong?</p>