3 of 3 people found this helpful
If your job is running on a set date then you just use %%$CALCDATE to add the required number of days.
Otherwise, I'm thinking to use %%OWDAY. Depending on when your start day of week is will determine whether this works.
If my start day of week is Saturday, then %%OWDAY for Saturday is 0, Sunday is 1, Friday is 6.
To determine how many days prior to Friday we are running do:
%%DAYGAP = 6 %%MINUS %%OWDAY
So if the job is scheduled on Monday (2), the gap is 4.
%%FRIDAY_DATE = %%$CALCDATE %%$ODATE +%%DAYGAP
Something like that. I haven't tested this code.
Hope this helps, it might not work depending on your start day of week, or maybe someone has a simpler idea!
Thank you, Paul. I will give this a try.
1 of 1 people found this helpful
If the job is scheduled on Monday, you can use following to get the Friday date:
FRIDAY_DATE=%%$CALCDATE %%DATE -3