Hi,
You may need to use a few text expressions to achieve this result.
Based on your description, it looks like the Status Update column follows a default template, where different updates are inserted in a descending order, separated by a line break and containing a title, a date/time between parenthesis and a description after a colon.
For the purposes of this answer, I'm working with the following sample data to simulate an entry in your SP List column. I'm focusing only in the expression issue for now, without covering the connection with SP List for read/update records, but if you need some support with Power Automate/SharePoint integration, I can send you a few additional instructions.
The data to be extracted is the date from Update 2, and we can achieve it by adding the following expression to a later action in the flow: first(split(split(outputs('Compose_-_Status_Update'), '(')[1], ' ')). This expression is isolating the text between the first "(" and the subsequent blank space:
At this point, you already have the most recent update date, and for getting the quantity of days between then and today you will need to use the following expression in a later action: first(split(dateDifference(utcNow(), outputs('Compose_-_Extracted_date')), '.')). This second expression gets the timespan of the date difference and extracts only the quantity of days that passed:
Since I'm not connecting to SharePoint for this example, my flow looks like this:
After running the flow, those are the outputs (12/13/2024 as extracted date and "-26" days between Dec 13 and today):
Additional resources
I'm also sharing a few resources about the topics discussed in this solution that can be useful for you or any other users that find this thread in the future:
- Video that is not directly related to this thread topic, but contains an example very similar to your use case on how to use text expressions to extract parts of a text with Power Automate:
https://youtu.be/RIaAi6Cmevw
Let me know if it works for you or if you need any additional help!
-------------------------------------------------------------------------
If this is the answer for your question, please mark the post as Accepted Answer.
If this answer helps you in any way, please give it a like.
http://digitalmill.net/
https://www.linkedin.com/in/raphael-haus-zaneti/