-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CreatedAt search with date range in listHandler #296
Comments
Isn't this akin to what's mentioned at mongoose tutorials on working with dates - querying? Users.find({ createdAt: { $gte: '2009-01-02', $lte: '2022-05-12' } }).
then(users => {
//
}); EDIT: My bad, was missing the "in listHandler" part from the title. 🤦 |
@alsabbahy @bitbay Hi! Thanks for the great questions. @bitbay is on the right track. This is not yet a feature included out-of-the-box, however there are some tricks that should get you what you need without too much effort. We can add this query option by including a For example: example-model.js
This would allow you to query a
You could easily modify this to accept other properties to compare against other than Hope this helps! |
@JKHeadley thanks for the quick reply. |
Hello, I've been trying to add the dateRange to rest-hapi querying. And I was wondering if you've had already implemented it or it exists to query with date range for field attribute like "createdAt".
The text was updated successfully, but these errors were encountered: