How to find data by querying date range parameters in MongoDB? I get the empty result. Could you please tell me what I am doing wrong. Thanks.
Here is my code:
{
“collection”:"****",
“aggregate”:[
{"$addFields":{
“ISOdate”: {
“$toDate”: {
“$toLong”: “$unix_date”
}
}
}},
{
"$match":{
"ISOdate":{"$gt":"{{ date }}")}
}
}
]
}