The easiest way to solve 1) is to use .net. If you prefer formulas, you can do something like this (you have to test to see that it works properly)
1) Find the current day of the week: {DATE(WeekDayNumber|Monday)}
2) Use this to find how many days to subtract to get to monday of current week: (if today is sunday, the previous step is 7, so: -7 - 6 +7 results in -6 days,
if today is tuesday, previous step is 2, so: -2 - 6 + 7 results in -1 )
{MATH(Add|Integer|{MATH(Subtract|Integer|{MATH(Multiply|Integer|{DATE(WeekDayNumber|Monday)}|-1|)}|6|#0)}|7|#0)}
3) Use result in step 2 to get to monday in current week:
{DATENOWADD(Days|{MATH(Add|Integer|{MATH(Subtract|Integer|{MATH(Multiply|Integer|{DATE(WeekDayNumber|Monday)}|-1|)}|6|#0)}|7|#0)}|dd.MM.yyyy)}
4) Subtract any number of weeks that you want (this is the final formula)
{DATEADD(Weeks|{DATENOWADD(Days|{MATH(Add|Integer|{MATH(Subtract|Integer|{MATH(Multiply|Integer|{DATE(WeekDayNumber|Monday)}|-1|)}|6|#0)}|7|#0)}|dd.MM.yyyy)}|dd.MM.yyyy|-1|dd.MM.yyyy)}
The parameter to replace is the -1 at the end of the formula, so in this example i have sutracted one week. Change formatting if you like
Thomas
Edited by user
2017-07-03T15:25:11Z
|
Reason: Not specified