I know this question has been asked earlier been none of the solutions worked for me.
I want to query a collection with createdAt
of type DateTime
. It seems to work perfectly in mongo shell but it returns empty array in Node.js
. I am using following code:
{
'$gte':new Date().toISOString()
}