I am using Alteryx Designer x64 Version 2024.2.1.14 and I need help with a formula. I need to use today's date to find the date of the previous Friday. I have this formula: DateTimeFormat(DateTimeAdd(DateTimeNow(), -1 * (DateTimeDayOfWeek(DateTimeNow()) + 2) % 7, 'days'), '%Y-%m-%d') but I'm getting an error message for the (DateTimeDayOfWeek) that says "Unknown Function". I have also tried using
DateTimeFormat(DateTimeAdd(DateTimeNow(), -1 * (DateTimeNow() - DateTimeAdd(DateTimeNow(), -1 * (DateTimeNow() % 7), 'days')), 'days'), '%Y-%m-%d')
but I get an error message at the % 7 saying "Unmatched(" Any suggestions?
Solved! Go to Solution.
The solution worked. Thanks for your help.
User | Count |
---|---|
109 | |
92 | |
78 | |
54 | |
40 |