Reputation: 377
I want to extract data for a week from previous day.
For example:
Today's date : 21-06-2021
I want a week's data from : 13-06-2021 to 20-06-2021
In Postgressql
Upvotes: 0
Views: 54
Reputation: 9345
you can try
select * from ur_tbl
where
date_clmn >= (CURRENT_DATE - INTERVAL '7 day') and
date_clmm < CURRENT_DATE
Upvotes: 1