Power Automate addMinutes() Function

Are you aware of using the Power Automate addMinutes() function? If not, check out this Power Automate addMinutes() function tutorial.

This Power Automate tutorial will guide you through all the functionalities of the Power Automate addMinutes() function syntax and the addMinutes() function. Also, a few examples of the Power Automate addMinutes() function.

addMinutes() function in Microsoft Power Automate adds minutes to a specific date or a timestamp.

Power Automate addMinutes() Function

Power Automate addMinutes() function is similar to the addHours() function, which can add a particular number of minutes to a specific date or timestamp.

This function can format the date results in the preferred method. It’s important to note that the function can process positive and negative values for the number of minutes to be included.

Power Automate flow addMinutes() expression

This is about the Power Automate addMinutes() function overview.

Power Automate addMinutes() Syntax

The Power Automate addMinutes() function syntax will be as shown below.

addHours('timestamp', Minutes, 'format')

Parameters:

  • Timestamp: A mandatory field with date and time in a string format.
  • Minutes: It is a required field that can take a positive or negative number of Minutes to add to the date.
  • Format: It is optional to format the string in a specific format. The default format is [yyyy-MM-ddTHH:mm: ss.fffffffK]. If the format is not valid, then it gives the error message.

When using the Power Automate addMinutes() function, the value will be a timestamp plus the specified number of minutes added to date with time.

Example:

addMinutes('2018-03-15', 10) 

Where,

  1. 2023-03-15 = Give the date as per your requirement.
  2. 10 = Specify the number of minutes you must add to the date.

The output returned from the add minutes expression will be (2018-03-15T00:10:00Z).

This is all about the Power Automate addMinutes() function syntax format.

Power Automate addMinutes() to a Date Variable

I will explain the addMinutes() function example by creating an ‘Instant cloud flow’ that will trigger manually in Power Automate flow studio.

Example:

In this example, we will add the given timestamp with a specific number of minutes. The outcome will display a date and time with the additional minutes.

Let’s imagine a timestamp as “2023-12-07“. To this, I need to add ’30 Minutes to the given date. Then, my result will be 2023-12-07T00:30:00.0000000, as shown below.

Power Automate addMinutes() to a Date Variable

To implement the example in a flow, follow the steps mentioned below.

1. Open the Power Automate Home page -> Click +Create -> Select Instant cloud flow -> In the next window, provide a flow name & select trigger Manullay trigger a flow-> Tap Create button.

  • Inside the trigger, ‘I have added ‘Date‘ as an input, as seen in the screenshot below.
Power Automate addMinutes() expression

2. Then, add the ‘Initialize variable‘ flow action under the trigger to store the date value during the flow. Set the parameters of the variable.

  • Name: Enter the variable name manually as Add Minutes.
  • Type: Select the type of a variable as String.
  • Value: Add the value that is provided in the below code.
Value: addMinutes(triggerBody()['date'],30)

After giving the expression, click on OK.

Power Automate addMinutes() function

3. For checking the outputs of addMinutes() expression, take the Compose flow action.

  • Inputs: Select the field -> Click on Expression -> Take the value of an initialized variable from dynamic content.
addMinutes() function in Power Automate

4. After creating the flow, Save and run the flow manually. In the next window, take the trigger date for which you want to add the minutes, then click Run flow. For example, I was taking [2023-12-07].

Microsoft Power Automate addMinutes() to a Date Variable

5. When the flow runs successfully, open the compose to check the output returned from the addMinutes() expression. It will display the date along with the minutes that we have given in the addMinutes() expression.

The result will be 2023-12-07T00:30:00.0000000.

 Power Automate addMinutes() to date variable

This is about Power Automate addMinutes() to a date variable.

Power Automate addMinutes() to utcNow

In this example, I will describe one more example of Power Automate addMinutes() to utcNow.

Example:

I will show how to add a specified number of minutes to the current date and time. Thus, the updated date and time will be displayed, including minutes to the Today’s date.

Let’s assume today’s date is “13-12-2023“, and I wanted to add 80 minutes to my current time. Then the result will be like 13-12-2023T10:58:37, as seen in the screenshot below. As my current time is [09:41:04].

Follow the same pattern of steps that are mentioned in the above example.

1. In the ‘Initialize variable‘ flow action, only change the addMinutes () expression provided in the code below. Enter the details of a variable.

  • Name: Enter the variable name manually as utcNow.
  • Type: Select String datatype from drop-down.
  • Value: Add the value that is given in the code below.
addMinutes(utcNow(),80,'dd-MM-yyyyTHH:mm:ss')

Then, click OK.

addMinutes() expression in Power Automate

2. The output received from the compose flow action will give us the current date and time by adding 80 minutes. The result will be displayed in the image below.

 Power Automate addMinutes() to utcNow

This is how to add minutes to the utcNow() in Power Automate using the addMinutes() function.

Power Automate addMinutes() to SharePoint Date

I will demonstrate Power Automate addMinutes() to SharePoint date in this section.

Example:

For that, I will use one of the SharePoint lists named ‘Email Sign Up Form‘ with ‘Date of Birth‘ as a date and time column. This list contains various items with date values, as seen below.

Power Automate addMinutes() function

Here, we need to add extra minutes to the SharePoint date column values. We are assuming the Date of Birth value as “22/12/2023“. Adding 25 minutes to this date will provide the result with the time as 22/12/2023T00:25:00.

Microsoft Power Automate addMinutes() function

To achieve this, follow the below steps:

1. Open Power Automate to create an Automated cloud flow with a trigger ‘When an item is created or modified. Set the details:

  • Site Address: Choose a specific site address from drop-down.
  • List Name: Select a specific SharePoint list from drop-down.
Power Automate addMinutes() to SharePoint date

2. Take the ‘Initialize variable‘ flow action to initialize the date column from the SharePoint list. Give details like:

  • Name: Enter the variable name manually as Date of Birth.
  • Type: Select String datatype from the drop-down.
  • Value: Select the field -> Take the ‘Date of Birth‘ column from the dynamic content.
Power Automate addMinutes() to SharePoint Date column

3. Next, add a Compose flow action to give the addMinutes() expression as below.

  • Inputs: Select the field -> Click on Expression -> Add the below expression.
addMinutes(variables('Date of Birth'),25,'dd/MM/yyyyTHH:mm:ss')

Then, select OK.

Microsoft Power Automate addMinutes() to SharePoint Date

4. Now the flow is ready, Save the flow. Test it Manually. After that, add an item to the connected SharePoint list.

addMinutes() to SharePoint Date in Power Automate

5. When the flow runs successfully, it will display the result in the compose outputs and add minutes to the date, as shown below. The result will be 22/12/2023T00:25:00.

addMinutes() function in Microsoft Power Automate

This is how to use the Power Automate addMinutes() function inside a flow to add minutes to SharePoint date.

Conclusion

From this Power Automate tutorial, I taught how to use the addMinutes() function in Power Automate. I have also explained the syntax of the Power Automate addMinutes() function and Power Automate addMinutes() expression with examples like those mentioned below.

  • Power Automate addMinutes() to a date variable
  • Power Automate addMinutes() to utcNow
  • Power Automate addMinutes() to SharePoint date

Additionally, you may like some more Power Automate tutorials: