Handling dates by calendar definition not by days number

#28
by Fadi-Aldalati - opened

I'm working with a small schema that consists of a few tables, and one of these tables contains data along with the date it was added.

When I asked the model to retrieve the total data from the last week, it provided data from the past 7 days. However, what I was actually hoping to obtain was the data from the beginning of the previous calendar week. For example, if today is Thursday and I inquire about data from last week, I expect the date range to start from the Monday of the previous week and extend to Sunday, rather than starting from the previous Thursday until today.

Is there an instruction that can facilitate this, or do you have any other advice on how to address this matter?

Sign up or log in to comment