In mongodb,
if I have a date, and I want to query for records that have a date later than the provided date I can do this:
collection.find({datefield:{$gt:somedate}})
And if I want to find records between a date range, I can do an $and with lt and gt.
But say that my datefield is actually datefields, a list of dates. And say that there are the following records for datefield
datefields = [june 1, 2015 hhmmss, june 2, 2015 hhmmss, june 14, 2015 hhmmss]
datefields = [june 1, 2015 hhmmss, june 3, 2015 hhmmss, june 8, 2016 hhmmss, june 17, 2015 hhmmss]
How would I construct the search to fetch for all records whose dates are between say june 3 and june 7, so that I only get the second record. And if ranges are not possible, can I do just a single search for june 3, 2015 while disregarding the hhmmss?