Query by timestamp in mongodb

Hi guys, I’ve the following query (find) in mongodb trying to search every record after a given date:

{
"customer.slug": "{{$json["slug"]}}",
"status": {"$in": ["captured", "canceled"]},
"created_at": {"$gt": {"$date": "2021-08-01T00:00:00.000Z"}}
}

Results:

  • if I remove the created_at statement, a lot of records return;
  • if I use as above, no records return;
  • if I use "created_at": {"$gt": "2021-08-01T00:00:00.000Z"} no records return

Is that possible to filter by date objects in mongodb through the mongodb node? What would be the sintax? I have records in the database created_at the date used in this example - so the problema is not the absense of data.

Thanks!

Ah yes, that is sadly a limitation of the node. Dates are not handled correctly. In the post below, you can find the explanation.