While undertaking a project, I faced an issue regarding a date-related task that required determining the day of the week for a specific date. I created a Power Automate flow to get the day of the week for a particular date, and I thought I would share this through this post.
In this article, I will tell you what the dayofweek Power Automate is, how to use dayofweek(utcnow()), Power Automate get day of week, and many more like:
- Power Automate dayofweek function
- Power Automate check day of week
- power automate if today is Monday
- Power Automate get weekday from date
dayofweek Power Automate
Power Automate dayofweek() function determines the day of the week for a particular date. Based on the provided timestamp, this function returns an integer representing the day of the week for the date.
| Day | Value |
| Sunday | 0 |
| Monday | 1 |
| Tuesday | 2 |
| Wednesday | 3 |
| Thursday | 4 |
| Friday | 5 |
| Saturday | 6 |
The below-provided code will represent the syntax that can be used in the Power Automate flow:
dayOfWeek('timestamp')dayofweek(utcnow()) Power Automate
To get the day of week number for the current date in Power Automate, see the example below:
Example:
Assuming that today’s date is 29-04-2024, I wanted to get the day of the week for this specific date. The result will give the week number like “1,” which means Monday.

For that, you can follow the steps below:
1. Browse Power Automate with your Microsoft credentials -> In the Power Automate Home page, tap +Create -> Select Instant cloud flow -> Provide a flow name & select trigger Manullay trigger a flow -> Tap Create button.
2. Take an Initialize variable flow action to initialize the Today’s date. Provide the parameters like Name, Type as String, and Value as utcNow().

3. After that, take a Compose flow action; in the Inputs section, enter the expression provided below.
dayOfWeek(variables('Day of year'))Click OK.

4. After completing the flow, Save the flow. Then, test the flow manually.
5. The compose flow action outputs will represent a numerical day of the week. Each number corresponds to a different weekday.
- Here, the return value is “1“, which represents Monday.

This is how to get the day of the week for the utcNow() in Power Automate.
Power Automate dayofweek
To get the day of week name for a trigger date, check out the below example:
Example:
In this example, I will trigger a date, ‘01-05-2024‘. My requirement is to get the week’s name for this specific date. The result will be “Wednesday.”

Go through the below steps to achieve this:
1. Create a Power Automate Instant cloud flow and take Date input inside to the trigger.
2. Then, select Initialize variable action, set the variable name, type as an array, and set the value with the below array with week names.

3. To get the day of the week in number for the trigger date, add the Compose action. Now, in input, write the below expression:
dayOfWeek(triggerBody()?['date'])
4. Now, we have to convert the number into the day’s full name. For that, add a Compose flow action and provide the expression.
variables('Week days')[sub(outputs('Day_of_week'),1)]
5. When the flow gets ready, save and run the flow. In the Runflow window, select a Trigger date and click on Runflow.

6. The output will display the Trigger date and day of week name, as you can see in the screenshot below:

This way, you can get the weekday name for a particular date in Power Automate.
Power Automate If Today is Monday
To get Monday from the dayofweek() function, check the below example:
1. In Power Automate, select the Manually triggered flow.
2. Now, to get the first day of the week, select the compose action. Then, in input, write the below expression.
formatDateTime(subtractFromTime(addDays(utcNow(), 1), dayOfWeek(utcNow()), 'Day'), 'yyyy-MM-dd')
Save and run the flow manually.
Output:
The output will then return on the first day of the week, which is Monday of the current week.

This way, you can get the first day of the current week using the Power Automate dayofweek() function.
Power Automate check if a day is a weekend
To check if a day is a weekend or not in Power Automate, see the example below.
Example:
Assume a specific date as ‘04-05-2024‘ if the provided date is the weekend, i.e.,[Saturday and Sunday]. It will return the weekend name or else it will return as ‘Weekday.’

Follow the steps:
1. In Power Automate, select the Manually triggered flow and take Date as an input.
2. Select initialize variable action, then provide the variable name, type as a string, and in value provide the Trigger date from dynamic content.

3. Next, select the Compose action. In input, write the below expression. Here, will add an expression to check if the date is a weekend or not, i.e., Saturday and Sunday.
if(or(equals(dayOfWeek(variables('Date')),0),equals(dayOfWeek(variables('Date')),6)),formatDateTime(variables('Date'),'dddd'),weekdays)
4. Now click on Save and run the flow manually. In the Runflow window, trigger a date-> Click on the Runflow button.

5. If the trigger date is a weekend, then it will display the week name like below for that particular date as shown in below figure:

This is how to check if a day is a weekend or not in Power Automate.
Power Automate Get Weekday from Date
To get the weekday from the SharePoint date column, check the below example:
Example:
For this example, I will use one of my SharePoint lists [Project Details] with a Project start date as a date and time column. Check the image below:

Whenever an item is created in this list with a Project start date, my task is to retrieve the weekday from the date column, ignoring the weekends [Sunday and Saturday].

To achieve this, see the below example:
1. Create a Power Automate ‘Automated cloud flow‘ with a trigger ‘When an item is created.’ Inside the trigger, provide the Site Address and List Name.

2. Next, take an Initialize variable flow action to initialize the SharePoint date column. Set the parameters like Name, Type as string, and Value from dynamic content.

3. Add one more Initialize variable and set the variable name, type as an array, and set the value with the array below with week names.

4. After that, include the Compose action to give the dayofweek() expression, which will give the day of the week from a date.

4. Here, I will use a Condition control to eliminate the weekends from the generated output. Add the below conditions:
@outputs('Compose_-_Get_weekday_number') is not equal to 0
(or)
@outputs('Compose_-_Get_weekday_number') is not equal to 6
5. Under True conditions, take a Compose action to display the weekday name. Provide the below-given expression in it.
variables('Week days')[sub(outputs('Compose_-_Get_weekday_number'),1)]
6. Once the flow is completed. Save and run the flow. Now, add an item to the SharePoint list as shown in the figure below:

7. If the created item with ‘Project start date‘ has a weekday, then it will return the weekday name and be displayed in the compose section

This way, you can get the weekday from date using Power Automate.
Additionally, you may like:
- How to Use Power Automate Get Items Filter Query
- Power Automate Send Email On Specific Date
- Power Automate String Functions
- Power Automate Approval Reminder
- 6 Various Ways to Sort Array in Power Automate
Conclusion
I trust this Power Automate tutorial is easy and understandable. Here, I have covered the below topics like:
- Power Automate dayofweek() function
- How to get a day of the week for the current date in Power Automate
- Power Automate get week name
- How to get Monday from Power Automate dayofweek()
- Get weekday from date in Power Automate
- Power Automate check if a day is a weekend

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.