Answers:
在这里找到答案:https : //stackoverflow.com/questions/1296358/subtract-days-from-a-date-in-javascript
db.system.profile.find({
"timestamp" : {
$lt: new Date(),
$gte: new Date(new Date().setDate(new Date().getDate()-1))
}
})
db.collection.find(
{$and:
[
{ "status.code":"DELIVERY_PENDING"},
{"status.createdDtm": {$lte: new Date().getTime()-(1*60*60*1000) }}
]
}
)