Search code examples
datesharepointpower-automate

How to convert PowerAutomate approval date stamp to a more readable format


I have a SharePoint List, updated by a PowerAutomate approval workflow. I'm using Send HTTP Request To SharePoint to do the updating of the relevant fields.

My SharePoint column entitled "Approval/Rejection" date, pulls the approval/rejection date through OK, but it's in this format "2024-08-30T12:58:05Z2024-08-30T12:58:05Z".

Is there a way to convert this to a more readable format, either in PA before it populates the SharePoint column, or even in Sharepoint using a Calculated Column to somehow extract the date part and convert it?

Have tried messing with the format in PA and SharePoint, but I think it's maybe the syntax that's throwing me at this point.


Solution

  • @Phil Edwards If you are updating SharePoint list item's rich text field with the date value, then u will need to format the date by yourself. sharePoint stores the date/time in UTC, you can use formatDateTime() such as formatDateTime('2009-06-15T13:45:30', 'M/dd/yyyy h:mm tt') which will returns the format 6/15/2009. Or formatDateTime('2009-06-15T13:45:30', 'M/dd/yyyy HH:mm:ss tt') which will return the format 6/15/2009 13:45:30 PM. Or formatDateTime(utcNow(), 'MMMM dd, yyyy, HH:mm') which will returns the current date time in the format June 15, 2009, 16:50. and so on..