I have a model:
var model = {
created: { type: Date, default: Date.now }
, data: { }
}
...but I cannot seem to select based on a date as per the guides I'm using. Here's what I'm trying:
Model.find({
created: { $lte: new Date('2012-03-16T20:54:35.630Z') }
}).run(function(err, models) {
// ...
});
I'm wondering if Mongoose has changed again... or if I'm just doing it wrong?
What you have looks ok. Here is a working example.
Are you getting error or just no results?
Another great place to get help is on the official forum here.
Try changing to ... .exec(function(err, ...
instead.