Hi how to change below to next week sunday, curren...
# general
s
Hi how to change below to next week sunday, currently this is this week but i want as next week sunday Thanks! ? case when {duedate} <= NEXT_DAY({today},'SUNDAY') then 1 else 0 end. is the following correct - CASE WHEN {duedate} <= NEXT_DAY({today},'SUNDAY') THEN DATEADD('day', 7 - DATEPART('weekday', {duedate}), {duedate}) ELSE {duedate} END
r
Just add 7 to the date you get from the next day function. You will have next week Sunday.
s
case when {duedate} <= NEXT_DAY({today},'SUNDAY') then 1 else 0 end. is the following correct - CASE WHEN {duedate} <= NEXT_DAY({today},'SUNDAY') THEN DATEADD('day', 7 - DATEPART('weekday', {duedate}), {duedate}) ELSE {duedate} END
@raghav - is that correct ?
case when {duedate} <= NEXT_DAY(DATEADD({today}, 7, 'day'), 'SUNDAY') then 1 else 0 end
r
This last one should work imo
You can apply the same in a result column to see how a date is impacting before you put it in the filter.
s
ok