$match: { $expr: {$eq: [{$week: "$Document.data.DATE"}, 27]} }
-
-
Save saravanapriyanm/b6b70773aac9de16e49aa5986d0205b0 to your computer and use it in GitHub Desktop.
$match: { "Document.data.DATE": { $gte: ISODate('2023/07/04'), $lt: ISODate('2023/07/05'), } }
[
{
$match: {
FormId: "f80e8870-ba52-4638-857d-039f4ee6a9c8",
IsLatestApproved: true,
},
},
{
$project: {
fieldType: {
$type: "$Document.data.DATE",
},
},
},
{
$group: {
_id: "$fieldType",
v: { $sum: 1 },
},
},
]
[ { $match: { FormId: "f80e8870-ba52-4638-857d-039f4ee6a9c8", IsLatestApproved: true, }, }, { $sort: { "Document.data.DATE": -1 }, }, { $group: { _id: { year: {$year:"$Document.data.DATE"}, month: {$month:"$Document.data.DATE"}, day: {$dayOfMonth:"$Document.data.DATE"} } } }, { $skip:2 }, { $limit: 1 } ]
[ { $match: { FormId: "f80e8870-ba52-4638-857d-039f4ee6a9c8", IsLatestApproved: true, }, }, { $sort: { "Document.data.DATE": -1 }, }, { $group: { _id: { year: {$year:"$Document.data.DATE"}, month: {$month:"$Document.data.DATE"}, day: {$dayOfMonth:"$Document.data.DATE"} } } }, { $skip:2 }, { $limit: 1 } ]
[ { $match: { FormId: "f80e8870-ba52-4638-857d-039f4ee6a9c8", IsLatestApproved: true, }, }, { $sort: { "Document.data.DATE": -1 }, }, { $limit: 1 } ]