hi everyone I want to get my date for this Monday, can someone help me?
For example, it's 3/7/2024 and I want to get 3/4/2024.
If it's 3/3/2024, I want to get 2/26/2024
Hi @Nick98765 ,
Use this expression in Power Automate-
'addDays(variables('YouInputDate'), -mod(dayOfWeek(variables('YouInputDate'), 1) - 2, 7))'
Replace 'YouInputDate' with the input date value.
If this helps you, please give kudos and mark it as a solution.
Thanks,
Sandeep Mishra
I tested the expression provided by @sandeepstw , and flow told me that the expression was invalid, so I was confused.
I used my method to test and found that I could also get Monday’s date.
if(equals(dayOfWeek(outputs('Date')),0),addDays(outputs('Date'),-6,'yyyy-MM-dd') ,addDays(outputs('Date'),mul(sub(mod(dayOfWeek(outputs('Date')),7),1),-1),'yyyy-MM-dd'))
Best Regards,
Sunshine Gu
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tomac 532 Moderator
Michael E. Gernaey 461 Super User 2025 Season 2
chiaraalina 256