Question: how to use .between() for date interval?
See original GitHub issueThis is a general “how to” question
I was looking to use .between() for a date interval eg low: today - 7 days, high: date today. Currently I’m using postgres so the where_raw looks like this
.where_raw("\"{}\".\"updated_at\" BETWEEN current_date - integer '7' AND current_date".format(table_a))
which is very grammar specific. is there a more db agnostic way to do this?
Happy to discuss Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Write an IF Statement for Dates Between Two ... - YouTube
How do you use IF in a date range ? How do I return a value if date within range ? If date...
Read more >SQL Between Operator overview and examples - SQLShack
This article explores the SQL Between operator to get a range of data along with its usage scenarios.
Read more >Select data from date range between two dates - Stack Overflow
This is easy, use this query to find select data from date range between two dates select * from tabblename WHERE (datecolumn BETWEEN...
Read more >DATE queries using BETWEEN - Ask TOM
I want to take several date/time interval values and sum them up. Do I REALLY need define my own special type using ODCIAggregateIterate()...
Read more >Excel SUMIFS date range formula - sum if between two dates
As you can see, the difference is only in the logical operators. In the first formula, we use greater than or equal to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Marlysson
👍 ❤️