I'm trying to find out how to do an specific query with mongoose. I have in mongodb something like this:
"startDateTime" : ISODate("2017-03-22T00:00:00.000Z"),
"endDateTime" : ISODate("2017-03-27T00:00:00.000Z"),
I want to get all the documents which that specific date is within that "startDateTime" and "endDateTime".
I have tried as follows but it returns no results.
var criteria = {};
criteria.$and = [];
criteria.$and.push({ startDateTime: {$gte: queryDate} });
criteria.$and.push({ endDateTime: {$lte: queryDate} });
queryDatevalue