Forum Discussion
Date.EndOfWeek issue
Hi.
I have a problem with Date formula.
I created a column for the date of Friday of the previous weeek using the formula below and the result is good. Apr 21 is the friday of last week.
However, the date changed to Apr 20 when I changed the column type to Date:
Does anybody know what causes the date to shift by 1 day? Is this a bug?
No, it is not a bug. With Day.Friday, you indicate that Friday is the first day of the week.
The end of the week is on April 20, just before midnight (as you can see in the bottom of the editor, if you select the datetime value), which gets rounded to April 21, 12:00:00 AM:
So if you take the date, it is April 20.
If you replace Day.Friday with Day.Saturday, then you get your desired result.
1 Reply
- MarcelBeugCommunity Champion
No, it is not a bug. With Day.Friday, you indicate that Friday is the first day of the week.
The end of the week is on April 20, just before midnight (as you can see in the bottom of the editor, if you select the datetime value), which gets rounded to April 21, 12:00:00 AM:
So if you take the date, it is April 20.
If you replace Day.Friday with Day.Saturday, then you get your desired result.