[
{
"$match": {
"$and": [
{
"$expr": {
"$gte": [
"$Invoice_date",
{
"$dateFromString": {
"dateString": "2022-07-17T00:00Z"
}
}
]
}
},
{
"$expr": {
"$lt": [
"$Invoice_date",
{
"$dateFromString": {
"dateString": "2022-07-18T00:00Z"
}
}
]
}
}
]
}
},
{
"$group": {
"_id": null,
"count": {
"$sum": 1
}
}
},
{
"$sort": {
"_id": 1
}
},
{
"$project": {
"_id": false,
"count": true
}
}
]