I need mongoose to run a query that finds documents older than an amount of time described in milliseconds found in the config folder. This amount of time is stored like this,
keys.anAmountOfMilliseconds
Thus far, I've been able to pull all documents created in between NOW and FIVE minutes as described in this link. **MongoDB: Only fetch documents created in the last 24hrs? **, but reverse engineering this query has so far been beyond me.
Any help would be amazing!! Thanks!