My scenario is to set the week start and end day by clicking a single button, so how would I calculate the days week start date and week end date?
for the week starting and ending date, I am using...
For Week End Date : $WeekEndDate = Get ( CurrentDate ) + (7 - DayOfWeek ( Get ( CurrentDate ) ) ) + 1
For Week Start Date:$WeekStartDate = $WeekEndDate - 6
These formulae are working fine on the following days "From Monday to Saturday" but when I click on Sunday it jumps to the next week days which make sense because the dayofweek for sunday is "1" but my requirement is when user although click on Sunday, the start and end date must meet the current week dates.
Looking forward to the answer.
Thanks in advance.