计算5天的截止时间,然后
find使用
$lt运算符和计算出的截止值执行:
var cutoff = new Date();cutoff.setDate(cutoff.getDate()-5);MyModel.find({modificationDate: {$lt: cutoff}}, function (err, docs) { ... });
计算5天的截止时间,然后
find使用
$lt运算符和计算出的截止值执行:
var cutoff = new Date();cutoff.setDate(cutoff.getDate()-5);MyModel.find({modificationDate: {$lt: cutoff}}, function (err, docs) { ... });