I would like to run a query that gets all the documents that have a lastUpdateDate
from a date provided until today.
lastUpdateDated is defined like
lastUpdateDate = new Date()
-> Tue Jan 19 2016 20:45:32 GMT+00:00
The following works in the RethinkDB Admin console
r.db('water').table('ground_water').filter(function (test) {
return test("lastUpdateDate").during(r.time(2015,1,1, 'Z'), r.now().date())
});
But here is the actual code (I have to do some processing on the date)
.table('ground_support_water_tests')
.filter(function(test) {
return test("lastUpdateDate").during(
r.time(2016,1,19, 'Z'),
r.now().date())
})
.run()
.then((results) => {
console.log(results);
done(null, results);
})
.catch((err) => {console.log(err); });
This returns no errors or results. I obviously like to not hardcode the date there so I have some logic to make a new r.time(yyyy,dd,mm)
but that gives me the same results as this hardcoded one.