Are you aware of updating the SharePoint list Date and Time column using a Power Automate flow? If not, then read this complete tutorial; I have explained here how to update SharePoint list date and time column in Power Automate with various examples.
For that, I have done my complete research on this topic and implemented it in Power Automate Flow. Through this tutorial, I will discuss how to update a SharePoint list Date field with Today’s Date.
Along with that, I will show you how to update a Date and Time column in the SharePoint online list with Today’s Date + 7 Days.
Then, I will explain the updating of a SharePoint Date column based on number field values using a Power Automate flow.
Update SharePoint Date Field to Today’s Date using Power Automate
Now, I will show you how to update a SharePoint online list date field with today’s date by a Power Automate flow.
I was working on a SharePoint list recently, where we wanted to update the date and time column based on the current date. For that, I have taken a SharePoint list named ‘PRODUCTS’ with different data type columns. Here are the details below.
|Column Name||Data Type|
|Product ID||It is a single line of text column – Renamed to Product ID|
|Product Name||Single line of text|
|Billing Date||Date and Time column|
|Estimated Delivery||Date and Time column|
As per the requirement, in this SharePoint list, the “Billing Date” column must be updated with the Today’s Date i.e., 10/26/2023[MM/dd/yyyy].
Follow the below instructions to create a Power Automate flow.
- Create an ‘Automated cloud flow’ with a ‘When an item is created’ trigger in a flow studio.
- Next, add the “Initialize variable” flow action to store the values of a variable during the flow. Set the below details for a variable.
- Name: Give a name for an initialized variable.
- Type: Select the datatype from the drop-down.
- Value: Add the value as utcNow() from the expression.
- Then, add the “Update item” flow action and give values like Site Address, List Name, and ID.
- Billing Date: Provide initialized variable value from dynamic content.
- Once the flow is ready, save it. Click on Test -> Test Manually.
- Then, the current date will be updated in the SharePoint list, as shown in the below image.
This is how to use a Power Automate flow to update the SharePoint Date and Time field with today’s date.
Update SharePoint Date field to Today + 7 days using Power Automate
Similarly, in this section, I will help you understand how to update a SharePoint list Date and Time column with Today’s date + 7 days.
I will use the same list as above, and I will update this time the Estimated Delivery column.
Let us update Today’s Date + 7 days in a SharePoint list based on the Date and Time column [Billing Date] using a Power Automate flow. Where the “Billing Date” column will contain the Today’s date i.e., 10/26/2023.
Follow the below step-by-step instructions:
- Navigate to https://make.powerautomate.com and click on +Create -> Select “Automated cloud flow”. In the next window, provide a flow name, choose “When an item is created or modified,” and click on Create.
- Provide Site Address and List Name.
- After that, add an “Initialized variable” and set the Name, Type, and Value for that variable.
- Value: Take value as “Billing Date” from dynamic content.
- Then, add a “Compose” data operation to add 7 days to the billing date in the inputs box.
- Finally, add an “Update item” flow action to update the date column values. Here are the details below.
- Provide the parameters like Site Address, List Name, ID, and Estimated Date.
- Estimated Date: Take outputs of compose action from dynamic content.
- Now, the flow is ready to save and test. Click on Save. Then, click on Test -> Manually test the flow.
- The below image shows updated SharePoint date values with today’s date + 7 days.
This is how to use a Power Automate flow to update the SharePoint online list date column with values.
Update SharePoint Date Column Using Power Automate
In this section, I will explain how to create a Power Automate flow to update a SharePoint list date field based on the number of column values.
Recently, I got a requirement to add days to the Travel Start Date field so that it will update the Date in Travel End Date. However, adding days should not be in the form of numerical values manually.
I should take Travel Duration days, the number column data type. I need to add these Travel Duration Days to Travel Start Days to update the Travel End Date value.
- Travel Start Date + Travel Duration Days = Travel End Date
For that, I have taken a SharePoint list named ‘Travel request forms‘ that have different data types as shown below:
Follow the below points to create a Power Automate flow.
- Navigate to the Power Automate Home page, click + Create, and select Automated Cloud flow under Start from blank.
- Next, in “Build an automated Cloud flow window”, Provide the Flow name and then select a trigger (When an item is created or modified) -> Click on Create.
- Create an Automate cloud flow with a trigger ‘When an item is created or modified’ and provide the below details:
- Site Address: Select a SharePoint site address from the drop-down.
- List Name: Click on the drop-down to select a specific SharePoint list.
- Then Click on + New step.
I added a trigger condition to the flow to avoid the infinite loop.
Trigger Condition:@not(equals(triggerBody()?[‘Title’],’National Conference’))
This means the Power Automate flow will trigger only when a user gives the input in the Title column of a SharePoint that is not equal to ‘National Conference’. If the user gives input in the Title column as ‘National Conference, ‘ the flow will not run.
- Click on three ellipses (…) in the upper right corner of the trigger and select settings.
- In the settings window, Click on +Add to add a trigger condition and Press the Done button.
- Add the “Get items” action, and provide the details like:
- Site Address: Select a site address from the drop-down.
- List Name: Select a specific SharePoint list from the drop-down menu.
- Click on the +New step.
- After that, add Apply to each loop; select output from the previous steps as ‘value‘ from the dynamic content as shown below:
- Select Add an action inside the Apply to each loop.
- Add Compose Data Operation, and give Inputs as the below expression.
- Click on Add an action under the compose action.
- Add another compose action; in the Inputs box – Include outputs generated from compose1 along with the below expression.
- Select Add an action under Compose 2 data operation.
- Add “Update item” (SharePoint) action, provide mandatory below details:
- Site Address: Select Site Address from the drop-down menu.
- List Name: Click on the drop-down to select a specific SharePoint list.
- Id: Select ID from the dynamic content.
- Title: Select Title from the Dynamic content.
- Travel End Date: Add outputs generated from the compose 2 data operation from the dynamic content.
- Once the flow has been created, Click on Save and select Test.
- In the Test Flow window, Select Manually and Click on Test.
- Now, add an item to a SharePoint list to run the flow.
- If there are no errors, the flow runs successfully and displays a notification of ‘Your Flow ran successfully.
- Then, it will update the date values in the SharePoint list Date and Time column (Travel End Date) as shown below:
This is how to update a SharePoint list date column values based on the number column using Power Automate.
I hope you got a clear view and better understanding of how to update a SharePoint Online list date and time column in Power Automate.
Through this tutorial, I have discussed, based on Power Automate flow, updating the SharePoint list date field with today’s date and today’s date +7 days.
Also, I have explained how to update a SharePoint Online list date and time column values based on a number column using Power Automate flow.
You may also like:
- How to get user email address in Power Automate?
- Update SharePoint Person Field in Power Automate
- Get Current and Previous Month in Power Automate
- How to Update SharePoint Choice Column in Power Automate?
Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.