Skip to content
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

Filtering by date #748

Closed
erkidhoxholli opened this issue Sep 29, 2018 · 2 comments
Closed

Filtering by date #748

erkidhoxholli opened this issue Sep 29, 2018 · 2 comments

Comments

@erkidhoxholli
Copy link

I am trying to filter records by date column, but it doesn't seem to be working.
This is what I am currently doing:
db.table('messages').where('date').between(dateFrom, dateTo)

The date is already saved as 'date' type in the database. Also dateFrom and dateTo are date objects as well.
How have you guys approached filtering by date ?

@dfahlander
Copy link
Collaborator

What you describes seems to be correct and should be working. The Date type is indexable.

In order to understand why it's not working for you, I think we need to see the surrounding code. The best would be if you could create a jsfiddle or similar that reproduces the issue, and I think we could help out getting to the bottom with the problem

@dfahlander
Copy link
Collaborator

Closing this as no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants