Power Automate Add Days to Date

In this Power Automate tutorial, we will discuss the addDays function using Microsoft Flow. We will see various examples of Power Automate add days to date And also we will discuss the below points:

  • Power Automate add days function
  • Power Automate add days to date column
  • Power Automate add days to date format
  • Power Automate add days to date variable
  • Power Automate add days to due date
  • Power Automate add days to current date
  • Power Automate add business days to date
  • Power Automate add 365 days to date
  • Add 2 days to date in power automate
  • power automate add one day to date
  • power automate add days to start date
  • power automate add days exclude weekends
  • power automate add days negetive
  • power automate add days to datetime
  • power automate add days to created date

Power Automate add days function

The Power Automate addDays function will add days to an existing timestamp and to deduct days we can use a negative value.

The Power Automate addDays function syntax

addDays('<timestamp>', <days>, '<format>'?)

Power Automate add days to date column

Here we will see how to add days to the SharePoint date column using Power Automate.

I have created a SharePoint list called Event list, so in this list, we have a date column called event date. We will add 2 days to the event date column.

Power Automate add days to date column
Power Automate add days to date column

In Power Automate, select the ‘when an item is created‘ trigger. Then provide the site address and list name.

How Power Automate add days to date column
How Power Automate add days to date column

Now we will add days to the date column, so click on the next step and select Compose action. Then in input provide the below expression:

addDays(triggerOutputs()?['body/EventDate'],2,'yyyy-MM-dd')
Microsoft Flow add days to date column
Microsoft Flow add days to date column

Now click on save and to run the flow create an item in the SharePoint list with the event date as 2-03-2022. After adding 2 days to the date column it will be 04-03-2022.

How Microsoft Flow add days to date column
How Microsoft Flow add days to date column

This is how to add days to date column using Power Automate.

Read Convert SharePoint document to PDF using Power Automate

Power Automate add days to date format

Here we will see an example of add days to date format using Power Automate.

In Power Automate, select the Manually trigger flow, then click on the next step.

Power Automate add days to date format
Power Automate add days to date format

Next, we will initialize a string variable to store the data, so select initialize variable action. Then provide the variable name, types string, and in value add a date with iso format.

How Power Automate add days to date format
How Power Automate add days to date format

Then add 1 day to date and format it to ‘dd-MM-yyyy’, so click on the Next step and select compose action, then provide the below expression:

addDays(variables('varDate'),1,'dd-MM-yyyy')
MS flow add days to date format
MS flow add days to date format

This is an example of Power Automate add days to date format.

Read Send an Email when Item added in a SharePoint list using Microsoft Flow

Power Automate add days to due date

Here we will see an example of Power Automate add days to the due date.

We have created a SharePoint list called Project, so in this list, we have a date column called the last date column. Once we add days to the date column we will update the list item with the updated last date

Microsoft Flow add days to due date
Microsoft Flow add days to due date

In Power Automate, select the ‘When an item is created’ trigger, then provide the site address, and list name.

Power Automate add days to due date
Power Automate add days to the due date

Next, we will add 10 days to the due date, so click on the Next step and select compose action. Then in input provide the below expression

addDays(triggerOutputs()?['body/Lastdate'],10,'dd-MM-yyyy')
How Power Automate add days to due date
How Power Automate add days to the due date

Next, update the item with the new due date, so click on the next step and select Update item action. Then provide the site address, list name, id, title, and in an update due date column provides the output of composing action.

MS Flow add days to due date
MS Flow add days to the due date

Now click on Save and to run the flow, create an item in the SharePoint list and you can see the result in the SharePoint

How MS Flow add days to due date
How MS Flow add days to due date

This is how to add days to the due date in Power Automate.

Read Microsoft Flow or PowerAutomate Example: Send a customized email when a new file is added

Power Automate add days to current date

Here we will see how to add days to the current date using Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

Power Automate add days to current date
Power Automate add days to current date

Next, we will add 10 days to the current date, so click on the Next step and select Compose action. Then in input write the below expression:

addDays(utcNow(),10,'yyyy-MM-dd')
How Power Automate add days to current date
How Power Automate add days to the current date

This is how to add days to current date in Power Automate.

Read Microsoft Flow or PowerAutomate Example: Save my email attachments to a SharePoint document library

Power Automate add 365 days to date

Here we will see how to add 365 days to the given date using Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

Power Automate add 365 days to date
Power Automate add 365 days to date

Next, we will initialize a variable to sore the date, so click on the Next step and select Initialize variable action. Then provide the variable name, type as string, and in value add a date.

How Power Automate add 365 days to date
How Power Automate add 365 days to date

Next, we will add 365 days to the above date, so click on the Next step and select compose action. Then in Input provide the below expression:

addDays(variables('Date'),365,'yyyy-MM-dd')
Microsoft Flow add 365 days to date
Microsoft Flow add 365 days to date

Now click on Save and run the Flow, you can see the 365 days are added to the given date.

MS flow add 365 days to date
MS flow add 365 days to date

This is how to add 365 days to date column using Power Automate.

Read Microsoft Flow Example Save tweets that include specific hashtag to a SharePoint list

Add 2 days to date in Power Automate

Here we will see how to add 2 days to date in Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Add an input and select date.

add 2 days to date in power automate
add 2 days to date in power automate

Next click on Add an action, select initialize variable action. Then provide the variable name, type as string, and in value write the below expression:

addDays(triggerBody()['date'],2,'yyyy-MM-dd')
add 2 days to date in Microsoft Flow
add 2 days to date in Microsoft Flow

Now click on Save and to run the flow assign a date like below:

add 2 days to date in MS Flow
add 2 days to date in MS Flow

Now you can see the date in output is incremented with 2 days if the date is 15-03-2022 to 17-03-2022.

How to add 2 days to date in MS Flow
How to add 2 days to date in MS Flow

This is how to add 2 days to date in Power Automate.

Read Move files from OneDrive for Business to SharePoint Online

Power Automate add one day to date

Here we will see how to add one day to date in Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate add one day to date
power automate add one day to date

Next, initialize variable action, then provide the variable name, type as string, and in value provide the current date with below expression.

utcNow()
power automate add one day to date
power automate add one day to date

Next, we will add compose action, then in Input add the below expression to add one day.

addDays(variables('Date'),1,'dd-MM-yyyy')
Microsoft Flow add one day to date
Microsoft Flow add one day to date

Now click on Save and run the Flow manually and you can see the result in the compose output.

MS Flow add one day to date
MS Flow add one day to date

This is how to add one day to date in Power Automate.

Read Log Gmail emails to a Google Sheet using Power Automate

Power Automate add days to start date

Here we will see how to add days to the start date using Power Automate.

So, for this example, we will use the task list in SharePoint Online.

power automate add days to start date
power automate add days to start date

In Power Automate, select the trigger When an item is created. Then provide the site address and list name.

How power automate add days to start date
How power automate add days to start date

Next, click on Add an action, select Initialize variable action. Then provide the variable name, type as a string, and in value add the start date from dynamic content.

Microsoft Flow add days to start date
Microsoft Flow add days to the start date

Now click on Add an action, then select the compose action, and in Input write the below expression.

addDays(triggerOutputs()?['body/StartDate'],10,'yyyy-MM-dd')
MS Flow add days to start date
MS Flow add days to the start date

Now click on Save and to run the flow create an item in the SharePoint list. You can see 10 days added to the start date.

MS flow add days to start date
MS flow add days to start date

This is how to add days to the start date using Power Automate.

Read Send myself a reminder in 10 minutes in Power Automate

Power Automate add days exclude weekends

Here we will see how to add days to exclude weekends in power Automate.

In Power Automate, select manually triggered Flow, then click on the next step.

power automate add days exclude weekends
power automate add days exclude weekends

Next select initialize variable action, then provide the variable name, and type as a string.

How power automate add days exclude weekends
How power automate add days exclude weekends

Add another initialize variable action, then provide the variable name, type as a string, and in value assign a date.

Microsoft Flow add days exclude weekends
Microsoft Flow add days excluding weekends

Now we will check the day is weekend or not by using the days of week function, it returns 0 if the date is Sunday, we will add 1 day to the date and returns 6 if the day is Saturday, we will add 2 days to the date. So, click on the Next step and select Switch action then provide the below expression:

dayOfWeek(variables('StartDate'))

Next, when the case equals 0, click on add an action and select Set variable action. Then select variable and provide the below expression:

addDays(variables('StartDate'),1)

When the case equals 6, click on Add an action and select Set variable action. Then select variable and provide the below expression:

addDays(variables('StartDate'),2)

In the default case, click on add an action, select Set variable action. Then select the variable name, add the start date.

MS Flow add days exclude weekends
MS Flow add days exclude weekends

Now click on Save and run the flow manually. As 2022-03-05 is Saturday so case 2 will run and will add 2 days to the date.

How MS Flow add days exclude weekends
How does MS Flow to add days excluding weekends

This is how to add days excluding weekends using Power Automate.

Read Save Twitter Tweets in SharePoint Online list using Microsoft Flow

Power Automate add days negative

Here we will see how to subtract 10 days from a date using Power Automate addDays function.

In Power Automate, select the Manually triggered Flow. Then click on the next step.

power automate add days negetive
power automate add days negative

Select Initialize variable, then provide the variable name, type as a string, and in value provide a sample date.

How power automate add days negetive
How power automate add days negative

Next, we will deduct 10 days from the above days, so click on the Next step and select compose action. Then in Input provide the below expression:

addDays(variables('varDate'),-10,'dd-MM-yyyy')
Microsoft Flow add days negetive
Microsoft Flow add days negative

This is an example of Power Automate add days negative.

Read How to create auto-increment column in SharePoint List

Power Automate add days to datetime

Here we will see how to add days to date time using Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate add days to datetime
power automate add days to datetime

Select compose action then in input field add the below expression:

utcNow()
How power automate add days to datetime
How power automate add days to datetime

Now we will add 2 days to the date-time, so click on the next step and select compose action. Then in Input provide the below expression:

addDays(outputs('Compose-_Ge_current_date_and_time'),2)
Microsoft Flow add days to datetime
Microsoft Flow add days to datetime

Now click on Save and run the flow manually and you can see the date-time stamp incremented by 2 days.

MS Flow add days to datetime
MS Flow add days to datetime

This is how to add days to DateTime using Power Automate.

Read Microsoft Flow or PowerAutomate: Trigger email based on user input

Power Automate add days to created date

Here we will see how to add days to the created date of the SharePoint item using Power Automate.

For this example, we will use the below SharePoint list called Event list.

How Microsoft Flow add days to created date
How Microsoft Flow add days to created date

In Power Automate, select the Manually triggered Flow, then click on the Next step.

power automate add days to created date
power automate add days to created date

Select Get items action, then provide the site address, List name of the SharePoint list.

How power automate add days to created date
How power automate add days to created date

Next, we will add days to the created date, so click on the Next step and Add apply to each action, then provide the value from dynamic content.

Now click on Add an action inside apply to each, then select compose action, and in input provide the below expression.

addDays(item()?['Created'],30,'dd-MM-yyyy')
MS Flow add days to created date
MS Flow add days to created date

Now click on Save and run the flow and you can see 30 days are added to the created date.

 Microsoft Flow add days to created date
Microsoft Flow add days to created date

This is how to add days to created date using Power Automate.

Read Create a Leave request approval workflow using Microsoft Flow in SharePoint Online

Power Automate add business days to date

Here we will see how to add business days to date by excluding weekends and holidays using Power Automate or Microsoft Flow.

So for this example, we will use the task list, to calculate the due date of a task by excluding weekends and holidays.

Power Automate add business days to date
Power Automate add business days to date

Next, we have a holiday list in SharePoint online.

How Power Automate add business days to date
How Power Automate add business days to date

In Power Automate, select the trigger, When an item is created. Then provide the site address and list name.

Microsoft Flow add business days to date
Microsoft Flow add business days to date

Now we will initialize 4 variables for Working days, counter, Start date, and Due date. So click on the Next step and select initialize variable action. Then provide the variable name, type, and value like below:

How Microsoft Flow add business days to date
How Microsoft Flow add business days to date

Now we will use Do until to loop the action until the value of the counter variable is equal to working days.

add business days to date using Power Automate
add business days to date using Power Automate

Inside Do until click on Add an action and select Compose action. In input select start date from dynamic content.

How to add business days to date using Power Automate
How to add business days to date using Power Automate

Next, we will increment the start date by 1, so click on the Next step and select Set variable action, then select the variable name, and in value write the below expression

addDays(outputs('Compose'),1,'yyyy-MM-dd')
How to add business days to date using Microsoft Flow
How to add business days to date using Microsoft Flow

Next, we will check the weekend, so inside do until action, add a condition action, then provide the below expression in both the case and set to 0 and 6 respectively.

dayOfWeek(variables('Start Date'))
How to add business days to date using MS FLow
How to add business days to date using MS FLow

Now if the condition true, we will check the date is a holiday or not, so for this in the If yes part, click on Add an action and select Get items action, provide the site address, list name, and in Filter query write the below query:

Date eq '@{variables('Start Date')}'
add business days to date using MS FLow
add business days to date using MS FLow

Next, we will calculate the length of get items value, so click on the next step and select Compose action. Then provide the below expression:

length(body('Get_items_-from_holiday_list')?['value'])
 MS FLow add business days to date using
MS FLow add business days to date using

Next, add a condition to check the length is 0 or not. If the condition is true we will increment the counter variable by 1.

MS FLow add business days to date
MS FLow add business days to date

Next outside the Do until loop click on the Next step and select Set variable action. Then select Due date and in value select the Start date from dynamic content.

How MS FLow add business days to date
How MS FLow add business days to date

Next, we will update the due date in the SharePoint list, so click on the Next step and select Update item action. Then provide the site address list name and map the value like below.

FLow add business days to date
FLow add business days to date

Now click on Save and to run a flow, create an item in the task list, and it will automatically update the due date.

How FLow add business days to date
How FLow add business days to date

This is an example of Power Automate add business days to date.

Related Power Automate articles:

In this Power Automate tutorial, we learned Power Automate add days function. And also we discuss the below points:

  • Power Automate add days function
  • Power Automate add days to date column
  • Power Automate add days to date format
  • Power Automate add days to date variable
  • Power Automate add days to due date
  • Power Automate add days to current date
  • Power Automate add business days to date
  • Power Automate add 365 days to date
  • add 2 days to date in power automate
  • power automate add one day to date
  • power automate add days to start date
  • power automate add days exclude weekends
  • power automate add days negetive
  • power automate add days to datetime
  • power automate add days to created date
>