How to Use dayOfWeek Function in Power Automate?

I encountered an interesting requirement last week when working with a client. They wanted to automate a process based on the day of the week in Power Automate. Precisely, they needed to trigger different actions depending on whether it was a weekday or a weekend.

Luckily, Power Automate provides built-in functions that make it easy to determine the current day. In this tutorial, I will tell you how to use dayOfWeek function in Power Automate and apply the conditions to execute different actions based on the day in Power Automate.

Power Automate dayOfWeek() function

The dayOfWeek() function in Power Automate tells you which day of the week a given date falls on.

It returns a number:

  • 0 for Sunday
  • 1 for Monday
  • 2 for Tuesday
  • 3 for Wednesday
  • 4 for Thursday
  • 5 for Friday
  • 6 for Saturday

Syntax:

dayOfWeek(timestamp)

Where: timestamp (Required) – A date value in string format (e.g., “yyyy-MM-ddTHH:mm:ssZ”) or a dynamic date value like utcNow()

Example:

If today is March 21, 2025, you can use:

dayOfWeek(utcNow())

If March 21, 2025, is a Friday, this will return 5.

Power Automate dayOfWeek() function

Check IF Day of the Week in Power Automate

Suppose your company has a Task Tracker SharePoint list where new tasks are added daily. The tasks should be auto-assigned to team members based on the day of the week:

  • Monday & Wednesday: Assign tasks to Lidia Holloway
  • Tuesday & Thursday: Assign tasks to Miriam Graham
  • Friday: Assign tasks to Patti Fernandez
  • Saturday & Sunday: No tasks should be assigned
Calculating working days in Power Automate

Now follow the below steps:

1. Create an automated cloud flow. Give the flow name and select the trigger When an item is created. Also, provide the Site Address and List Name.

Power Automate check day of week

2. Add a compose action, which is to check the day of the week using the below expression:

dayOfWeek(utcNow())
Power Automate If day of the week

3. Then add Switch Condition to Assign the Task.

  • On: Take the Output of the Compose action from the dynamic content.
dayofweek power automate

4. Click + Add case to add the first switch case. Manually enter the value 1 (Monday) inside the Equals parameter.

power automate dayofweek

5. Add the Update item action inside the case, providing the Site Address and List name. Then, expand Advanced parameters and provide Assigned To Claims as Lidia Holloway.

dayofweek(utcnow())

6. In the same way add Case 2(Tuesday) and Add an Update item action.
Then Set Assigned To = Miriam Graham.

power automate day of week

7. Same way do Case 3(Wednesday), Case 4(Thursday), and Case 5 (Friday) where:

  • Case 3 Assigned To = Lidia Holloway
  • Case 4 Assigned To = Miriam Graham
  • Case 5 Assigned To = Patti Fernandez
power automate weekday

Now, save the flow. Then, go to the SharePoint List and add an item.

Check IF Day of the Week in Power Automate

After the flow runs successfully, go to the SharePoint list and refresh it. You will see that the assigned person is set to Patti Fernandez because today is Friday.

Power Automate Check IF Day of the Week

Check the Day of the Week from the Date in Power Automate

I use the same SharePoint list to check this, but the requirements differ. I want Power Automate to check if the Due Date falls on a Saturday or Sunday. If it does, an email notification will be sent.

power automate day of the week

To do this, follow the below:

1. Browse Power Automate, then provide your Microsoft credentials. On the Power Automate Home page, tap +Create. Select Instant cloud flow. Provide a flow name and select trigger Manullay trigger a flow. Tap the Create button.

power automate in a day

2. Add a ‘Get items‘ action and provide the site address and list name. Since I do not want to send an email if the task status is ‘Completed,’ expand the Advanced parameters, click on ‘Filter Query,’ and provide the following parameters:

TaskStatus ne 'Completed'
day of week power automate

3. Add a compose action and provide the below expression:

formatDateTime(items('For_each')?['DueDate'],'dddd')
power automate get day of week

4. Then add a condition action and provide the below :

  • Left side: Output of the Compose action
  • Operator: is equal to
  • Right side: Saturday

Click “Add Row” in the condition and add another check:

  • Left side: Output of the Compose action
  • Operator: is equal to
  • Right side: Sunday
powerautomate dayofweek

5. In the true section, add a send an email action and provide below parameters:

  • To: Provide the Assigned to email address.
  • Subject: Task Due on a Weekend – Adjust Your Schedule!
  • Body: Provide the below:
Your task '@{item()?['TaskName']}' is due on a weekend (@{formatDateTime(items('For_each')?['DueDate'],'dddd')}). Please plan accordingly!"
How to Check the Day of the Week from the Date in Power Automate

Save the flow and run it manually. After the flow runs successfully, you will see that if the due date falls on any assigned people, they will receive an email like the one shown below.

How to Check the Day of the Week from the Date Power Automate

Conclusion

In this tutorial, we explored how to check the day of the week in Power Automate using the dayOfWeek() function and formatDateTime(). We learned how to automate task assignments based on weekdays and send email notifications if a task is due on the weekend. By following these steps, you can ensure tasks are assigned efficiently and that team members receive timely alerts.

You may also like:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App