I am having an issue with mongodb. Could anyone explain me why this works (gives back some results):
db.getCollection('test').find({"reportedOn" : { "$gte" : ISODate("2019-03-01T01:20:00"), "$lt" : ISODate("2019-04-01T02:00:00") } });
And this doesn't work (returns zero):
db.getCollection('test').find({"reportedOn" : { "$gte" : { "$date" : 1551398400000 }, "$lt" : { "$date" : 1554073200000 } } });
Thanks a lot.