Update single Date and Time SharePoint column with Power Automate

“Is there a way to update only a single Date and Time SharePoint column with Power Automate without filling all the mandatory fields in the ‘Update item’ action?”


When you update the SharePoint Date and Time column with Power Automate, you’ve got multiple options. One of them is to use the ‘Update item’ action. The action that will force you to fill out again all the mandatory columns just to update a single date. Or you can use an update via HTTP request to update the column directly. But what might notice is that the HTTP update doesn’t like the ISO time format (‘yyyy-MM-dd’). If you use it, you’ll see a green checkmark at the action, but it won’t update the date. ‘You must specify a valid date within the range of 01/01/1900 and 31/12/8900.’

Power Automate update single date SharePoint

HTTP request to update a Date (and Time) column

Unlike the standard ‘Update item’ action, HTTP request doesn’t accept the ISO formatted date. Instead, it wants the day first, then the month, and year is the last. And the funny part is, it doesn’t care about the separator. You can use any of the formats below, and maybe even more. The important part is to keep the order – day, month, year.

dd/MM/yyyy
dd-MM-yyyy
dd.MM.yyyy

Using the same HTTP request as many times before…

Method: POST

Uri: _api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem

Body:
{
    "formValues":[
	{
	    "FieldName": "<FieldToUpdate>",
	    "FieldValue": "<ValueToUpdate>"
	}
    ]
}

… the Body part might look as below:

{
    "formValues":[
	{
	    "FieldName": "DateAndTime",
	    "FieldValue": "utcNow('dd/MM/yyyy HH:mm')"
	}
    ]
}

Note: the whole utcNow(…) part in the example above is an expression.

Power Automate update single date SharePoint

Such HTTP request will get the result you want to see – no error code, no error message.

Summary

If you use the HTTP request to update a single SharePoint date column with Power Automate, you should always check the request result. If it doesn’t like the input, it won’t fail (unless it’s terribly wrong). The flow will tell you it was successful, but nothing will be updated. And that’s especially true if you update the date column. If you don’t use the right format, e.g. dd/MM/yyyy, your flow can run for a long time until you notice it’s not working.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Add a Comment

Your email address will not be published. Required fields are marked *