-1

In power automate (desktop), regardless if it is monday or saturday, how can I calculate the tuesday of the current week?

bitshift
  • 6,026
  • 11
  • 44
  • 108

1 Answers1

0

Try this algorithm:

  1. Get current datetime in %CurrentDateTime%
  2. Format %CurrentDateTime% to get the Day of Week with "dddd" format, or use the built in property %CurrentDateTime.DayOfWeek%
  3. Get the number of days to add to %CurrentDateTime% given Day of Week by the following logic:
  • a) For sunday, 4
  • b) For monday, 3
  • c) For tuesday, 2
  • d) For wednesday, 1
  • e) For thursday, 0
  • f) For friday, -1
  • g) For saturday, -2
  1. Add that number of days to %CurrentDateTime%
carlosherrera
  • 177
  • 2
  • 11