[Bug] - querying by date in the normal view.
in the query builder view i have this in my query:
{CreatedDate: {$gte: new Date(2017,11,1)}}
No data gets returned, I couldn't figure it out, until I went to the Query Code tab, and this is the raw query:
use qe-metrics;
db.remedyforce_incident.find({
"CreatedDate" : {
"$gte" : ISODate("2017-11-01T05:00:00.000+0000")
}
});
you changed month 10 to 11... and seeing that it is not November yet, well, not records. Not sure why you are changing the month.
Thanks
-
Hi,
We checked this in the latest 2018.2.5 release of Studio 3T and there doesn't appear to be a bug.
Take care with JavaScript Date objects - the month number is 0-based, i.e. 0 is January and 11 is December. See: https://www.w3schools.com/js/js_dates.asp. Whereas with ISODates, months are '01' for January through '12' for December.