Forum Discussion
Biweekly Dates Not working properly
- 4 years ago
Guessing that you didn't write the function yourself because there's an explicit test to see what's bigger, the start of the year or the week start. It effectively starts a new period when it's a new year.
Remove the start of the year stuff for starters and see what that gets you.
Hi, thank you for the reply. I deleted the extra variable and it shows properly at the end now. but this triggered another problem. The bi weekly dates are in the periods given by the function, but the period is not the actual periods. They are off by 1 week.
Take an example of date Jan 10, 2022. It should belong to the period from Jan 2 - Jan 15, which means it should show Jan 4, but the function produces Jan 9, because it thinks Jan 9 - Jan 22 is a period. Technically, Jan 10 is within the range, so the function is working, but not producing desired output.
How can I correct this? I did some dumn moves like returning
_WkStart - 7
and realized this would mess up the whole calculation. Please kindly share some more wisdom, thank you!