首页 > 技术文章 > Mongodb between 时间范围

jeffhong99 2020-11-27 19:02 原文

db.getCollection("Order").find({
"Supplier.ServiceCode": "CNI",
"$and": [{
"UpdateOn": {
"$gte": new Date("2020-11-01T00:00:01.474Z")
}
}, {
"UpdateOn": {
"$lt": new Date("2020-11-18T00:00:01.474Z")
}
}]
}).length()

推荐阅读