Find first day or last day of the week

How do I get the first day and last day of the week for a given date field ?

I am so used to running :

select date_add(‘2020-02-24’,5 - pmod(datediff(‘2020-02-24’,‘1900-01-01’),7));

It doesn’t work in Dremio. There is no example on the documentation either. Can you help ?

1 Like