Are you looking out how to work with the Power Automate dayOfMonth() function and Power Automate dayOfYear() function? No problem!
In this Power Automate tutorial, I have explained how to use the Power Automate dayOfMonth() function, Power Automate dayOfYear() function, and its syntaxes. Also, I will show you a few examples of the dayOfMonth() and dayOfYear() in Power Automate.
Power Automate dayOfMonth() Function
Power Automate dayOfMonth() function returns the day of a month from a given timestamp. This function is simple and easy, resembling the Power Automate dayOfWeek() function.
The dayOfMonth() function extracts the day of a month from a timestamp. It can be utilized with various timestamp inputs, such as date with time and utcNow().

This is a brief introduction to the Power Automate dayOfMonth() function.
Power Automate dayOfMonth() Syntax
The Power Automate dayOfMonth() function syntax will look like as shown below:
Syntax: dayOfMonth('timestamp')The ‘dayOfMonth()’ expects a single parameter that is a timestamp in the expression; if not, it will generate an error in the flow.
Parameters:
Timestamp: It works with only the parameter required to be a ‘String’ and mandatory to provide.
The return value is an integer that gives the output as the day of the month from the specified timestamp.
Example:
dayOfMonth('2023-12-11T13:27:36Z')Where,
- 2023-12-11T13:27:36Z will be a timestamp that needs to be specified.
The dayOfMonth() function will return the output as 11, which is the day of the month.
This is the Power Automate dayOfMonth() function syntax format in a flow.
Power Automate dayOfMonth() of utcNow
Let’s begin with examples of the dayOfMonth() function by creating an ‘Instant cloud flow’ that will trigger manually.
Example
Within this example, we wanted to extract the day of the current date within the month. So Today’s date “11/12/2023 “. Then, my result will be 11, representing the 11th day of the month, as shown below.

For that, you can follow the steps that are mentioned below.
1. Log in to Power Automate with your Microsoft credentials -> In the Power Automate Home page, tap +Create -> Select Instant cloud flow -> In the next window, Provide a flow name & select trigger Manullay trigger a flow -> Tap Create button.
2. Following that, include an ‘Initialize variable‘ flow action to retain the text values throughout the flow. Be sure to specify the details of the variable.
- Name = Provide the variable name as Date.
- Type = Select variable type as String.
- Value = Select the field -> Click Expression and write the code below:
dayOfMonth(utcNow())After giving the expression, Select OK.

3. Add the Compose flow action to verify the output generated by the dayOfMonth() expression.
Inputs: Select the field -> Take the Date variable from dynamic content.

4. By completing the flow, Save the flow. After that, Test it Manually. When the flow runs successfully, it displays the notification as ‘Your flow ran successfully.’
5. The compose flow action shows that dayOfMonth() will extract the day of the month, as shown below.
- The result of a dayOfMonth() expression will be the 11th day of a month.

This is how to get the day of a month from utcNow using the Power Automate dayOfMonth() function.
Power Automate dayOfMonth() from SharePoint Date
In this example, I will show you the Power Automate dayOfMonth()function, taking the SharePoint list as a reference in an Automated cloud flow.
Example:
I have taken a SharePoint list [Course Enrollment] with a date column named Course Enrolling Date. This list has various items along with dates, as shown below

We wanted to extract the day of the month from the SharePoint date column using Power Automate. Let’s imagine a date “25/12/2023“, which will provide the result as 25, the 25th day of a month.

Follow the same steps that are mentioned in the above example.
1. Navigate to make.powerautomate.com in the browser to open the Power Automate Home page. On the Home page, click +Create -> Select Automated cloud flow -> Give flow name and choose the trigger -> Click Create button.
Inside the trigger, provide the below details, as shown in the screenshot.
- Site Address: Select a SharePoint site address from the drop-down.
- List Name: Choose a specific SharePoint list name from the drop-down.

2. After that, initialize the Course Enrolling Date column. For that, take an Initialize variable flow action. Then, set the details of the variable.
- Name: Enter the name manually.
- Type: Select datatype as String from the drop-down.
- Value: Select the value as Course Enrolling Date from dynamic content.

3. Under the trigger, include the dayOfMonth() expression with the variable in the Compose flow action.
Inputs: Select a field -> Click Expression -> Take the below expression.
Click on OK.
dayOfMonth(variables('Course Enrolling Date'))
4. Save the flow and run the flow manually once the flow is created. Following that, add an item to the associated SharePoint list.

5. When the flow runs successfully, it will display the output in the compose flow action. If the dayOfMonth() function satisfies, then it will extract the day of the month from the date as below.
- The return value from the dayOfMonth() expression will be 13.

This is how to use the Power Automate dayOfMonth() expression to return the day of the month from a timestamp.
Power Automate dayOfYear() Function
Power Automate dayOfYear() function is helpful to get the sequential day of that particular year of a provided timestamp or from a date and time. It will calculate the days between 1 to 366, irrespective of the months.
The return output value from this function will be in the form of an integer, which gives the day of the year from the specified timestamp.
Let’s say Today’s date is “15-12-2023“; then it will give the sequential day of the year that specific date. And the result will be 349, which is the 349th day out of 366 days.

This is a brief introduction to the Power Automate dayOfYear() function.
Power Automate dayOfYear() Function Syntax
Power Automate syntax for the dayOfYear() function is given in the below code:
dayOfYear('timestamp')Parameters:
timestamp: It works with only one parameter required to be a String and mandatory to provide.
Example:
dayOfYear('2023-12-12')- 2023-12-12 = Provide a specific date.
It gives the output as ‘346‘, the sequential day of the particular year.
This function calculates results based on the period between January 1 and December 31, with no rounding applied (irrespective of month numbers).
However, an error will be returned if the datetime parameter is absent or not recognized as a valid date or time.
Power Automate dayOfYear() of utcNow
Let’s see how to get a day of a year from the current date in a Power Automate flow using the dayOfYear() function.
Example:
Let’s assume Today’s date is “15-12-2023“, and I need to know the current day’s count in a year. Then, the result will be 349, which means 349th day out of 365 days.

To work around this, follow the below steps:
1. Browse https://make.powerautomate.com to open the Power Automate Home page with your Microsoft credentials. Then click +Create -> Select Instant cloud flow -> Provide a flow name & select trigger Manullay trigger a flow -> Tap Create button.
2. To initiate the string variable and assign the utcNow() value to it, please follow the instructions below:
- Choose the “Initialize variable” action.
- Assign a variable name and set its type as a String.
- Set the variable’s value as utcNow() with the dayOfYear expression.
Value: Select field -> Click Expression -> Add the code -> Click OK.
dayOfYear(utcNow())
3. To add outputs from the initialized variable to the workflow, choose and add a Compose flow action.
Inputs: Select the field -> Select a Day of Year variable from the dynamic content.

4. Save the flow before manually testing it once it is complete. The compose flow action will extract the current date’s day of the year using the dayOfYear() function.
- The result from the expression will be the 349th day of that particular year.

This is how to process the day of a year of the current date using the Power Automate dayOfYear() function.
Power Automate dayOfYear() from SharePoint Date
Upon implementing the previous example, we will now see how to retrieve the day of the year from a SharePoint date column from Power Automate.
Example
I have taken a SharePoint list [Medical Camp Registration] with a date column named Date of Birth. This list has various items along with dates, as shown below:

We wanted to extract the day of a particular year from the SharePoint date column using Power Automate. Let’s imagine a date, “22/12/2023“, which will provide the result as the 356th day of that particular year.

Do follow the below-mentioned steps:
1. Log into Power Automate with your Microsoft credentials -> In the Power Automate Home page, tap +Create -> Select Automated cloud flow -> Provide a flow name & select trigger When an item is created or modified -> Tap the Create button.
- Site Address: Select a SharePoint site address from the drop-down.
- List Name: Choose a specific SharePoint list name from the drop-down.

2. Initialize the Date of Birth column by initiating the Initialize variable flow action. Set the parameters of the variable.
- Name: Provide the name manually as the Date of Birth.
- Type: Select datatype as String from the drop-down.
- Value: Select the value as the Date of Birth variable from dynamic content.

3. Take the dayOfYear() expression and the variable into the Compose flow action under the trigger.
Select a field -> Click Expression -> Insert below expression.
dayOfYear(variables('Date of Birth'))Then, Click on OK.

4. Save and Test the flow manually once the flow is created. Following that, add or modify an item to the associated SharePoint list. Here, I was modifying one of the existing SharePoint list items.

5. When the flow runs successfully, it will display the output in the compose flow action. The return value from the dayOfYear() expression will be 356, which is the 356th day of the year.
- Here, the triggered date is 12/22/2023, the 356th day of the year.

This is how to use the Power Automate dayOfYear() expression to return the day of the year from a timestamp.
Conclusion
In this Power Automate tutorial, I have explained how to use the dayOfMonth() function in Power Automate. I have described the syntax of the Power Automate dayOfMonth() function and covered a few examples of the dayOfMonth() function in Power Automate as mentioned below:
- Power Automate dayOfMonth() from SharePoint Date
- Power Automate dayOfMonth() from utcNow
Also, you may like some more Power Automate tutorials:
- Power Automate addDays() Function
- Power Automate isFloat() Function
- Power Automate Get items Order By

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.