So basically I have to check if yesterday's date was a weekend or not if it is the weekend I have to pick friday's date
The format which I am following: YYYY-MM-DD
Example:
* if today's date is 2020-11-09 -> yesterday's date will be 2020-11-08 (which is sunday) exclude -> 2020-11-07 (saturday) exclude -> 2020-11-06 (Friday) <- this is my answer
* another scenario, if today's date is 2020-11-10 -> yesterday's date, will 2020-11-09 ( Monday) <- this is my answer
Let me know if there is any confusion
Thanks
Hi @Sshasnk,
Check out the DateTime and Conditional functions in the formula tool to help you identify the day of the week, and use that to roll the date back as desired:
Hello @Sshasnk,
Below my answer:
Attached the workflow as well, please mark it as solved if it sole your problem 🙂
Regards,
Try this. The formula is calculating the day of the week in number. If it's 1 (monday) then it's subtracting 3 days to get to friday. If it's 2 (sunday) then it's subtracting 2 days to get to friday. Otherwise, it's subtracting 1 day.
You can swap the date field ([field1]) for datetimetoday().
If there is a holiday in between or on Friday then how it will work. How to add holidays