About time range search in mongodb

Hello, my name is kyu.
I am currently having a problem while using n8n.

{ "mytime": {"$gte": ISODate("2020-01-19T05:26:47.952+00:00")} }

I get an error when using a query similar to the above in mongodb node.
I’m trying to do a search using a time range, but it doesn’t work.
Could you please tell me how to search using time in mongodb node of n8n?

Hey @kyu_lee!

Welcome to the community!

I don’t have a lot of experience with MongoDB, but I tried the following query and it gave me the desired results - { "date": {"$gt": {"$date":"2020-01-19T05:26:47.952+00:00"}} }. From what I understand is the date you’re passing is not in the ISO format and that is why you’re getting the error.

Hope this helps :slightly_smiling_face: