Date query in Postman

Hello everyone,
I have a collection that I want to query on dates, and I need to pass them

Under mongo compass in filter I pass { "date": { $gt:ISODate('2022-06-05') } } and it works, but I can’t convert it to work with postman

     "dataSource": "{{DATA_SOURCE}}",
     "database": "{{DATABASE}}",
     "collection": "{{COLLECTION}}",
     "filter": {
         "date": {"$gt": ('2022-06-05')}

Hi @Cedric_95fr - Welcome to the community :slight_smile:

Do the details and examples on this post help? In saying so, I believe your filter should be something like the following example:

"filter": {
            {"$gt": {"$date": "2022-06-05T00:00:00Z"}}

Please test this out on a test environment and see if it helps in your case.

If not, could you provide sample documents within your database and your expected output?


Hi Jason , do you know how to query with a regular expresion?
I tried this { “area” : /. no se que. / } , it works in Compas .
but when I tried with the data api I needed to put quotes
as this : {“area” : “/. no se que. /”} and this didn’t work