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()
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()