Can't use ISODate on atlas?

Pretty simple problem:

I can run this filter on MongoDB compass locally and it works as expected:
{date_created : ISODate('2021-02-01T16:00:01.000+00:00')}

But when i try to run it on MongoDB atlas in the filter box, i get an error:
The provided parameters were invalid. Check your query and try again.

Is this a bug or am i misunderstanding something? Would appreciate any explanation or resource.

Hi @Navdeep_Singh,
Welcome to MongoDB Developer Community Forums!

As noted in the documentation, the Atlas Data Explorer does not support date queries that use the IsoDate() function. Instead, use the MongoDB Extended JSON (v2) $date data type for date queries.

You may wish to try using the following filter in Data Explorer to see if it returns any results:
{date_created: {$date:"2021-02-01T16:00:01.000+00:00"}}

Hope this helps.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.