Hi Community,
I currently have a extensive approval process flow that has a Status column within SharePoint with the options of (Manager Notified, Selector Notified, Selector Approved, Returned). Throughout the Approval process based on certain Outcomes I have a Update Item action that changes the Status to the appropriate option. Now I am being asked to determine how long (Date length) the process sat in each Status Option. Does anyone have any guidance as to how to achieve this? Any help would be great, thank you in advance!
Store the starting date time string in a variable and convert the value to ticks. Store the ending date time string in another variable and convert it to ticks. Subtract the start value from the end value and divide the difference by 864000000000
That will be the time difference
You may find this explanation helpful: dynamics crm - DateDiff() Function in PowerAutomate: Where is it? - Stack Overflow
create a variable of type integer called varStartDateTicks for the start date using the ticks() function
ticks(triggerBody()?['StartDate'])
create a variable of type integer called varEndDateTicks for the end date, using the ticks() function
ticks(triggerBody()?['EndDate'])
subtract the two variable values and divide the result by 864000000000
div(sub(variables('varEndDateTicks'),variables('varStartDateTicks')),864000000000)
Here is an excellent post on this topic:
If this helped, please mark it as a Solution and give it a thumbs up.
Anne
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1