Answer the question
In order to leave comments, you need to log in
How to create a query from a database with a time interval?
Good afternoon!
Essence of the question:
in the rails application in the model there are 2 columns in the database start_time (time), end_time (time)
There is a search block where it is possible to specify the start time and end time.
actually the question is how to sample only those data that fall within a given interval?
Thank you!
where("start_time >= ? and end_time <=?", start_time, end_time) doesn't help. a lot of extra stuff :(
Answer the question
In order to leave comments, you need to log in
If you have something superfluous displayed, apparently, you need to supplement the filter with some conditions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question