{
“collection”: “XXXX”,
“aggregate”: [
{
“$project”: {
“date”: {
“$toDate”: {
“$concat”: [
{
“$toString”: {
“$year”: “$createdAt”
}
},
“/”,
{
“$toString”: {
“$month”: “$createdAt”
}
},
“/”,
{
“$toString”: {
“$dayOfMonth”: “$createdAt”
}
}
]
}
}
}
}]
}
The above is a snippet from my code. When I run it, I get an error that says “invalid operator ‘$toDate’”. Can anyone help with the matter?