Dec 16, 2024 03:49 PM
Hi,
I was trying to extend the below formula to give me records due 2 weeks from now so I modified this:
To this:
Dec 16, 2024 07:54 PM
Since a year consists of a total of 52 weeks, using WEEKNUM can cause an issue where the last week of December, which includes January, is reset to 1, leading to value errors.
To address this, the formula may need to be modified in a somewhat complex way, or if not using Monday as the reference day, you can try using the following simple code:
Dec 16, 2024 07:58 PM
Hi,
I tried your formula, it works for Current and Next Week
Doesn't work for 2 weeks, because of year ending and dates (Dec 30-31) counted as 1st Week of 2025
To avoid overcomplex formula with year end checking , I would fix year cycle in a following way:
SWITCH(
WEEKNUM({Flight Start},"Monday")-WEEKNUM(TODAY(),"Monday")+
52*(WEEKNUM({Flight Start},"Monday")-WEEKNUM(TODAY(),"Monday")<-49),
0,'Curent week',
1,'Next week',
2,'2 weeks')