power Automate : Date difference in hours

Pradeep Nemadi 6 Reputation points
2022-06-18T18:25:11.353+00:00

Looking for solution in Power Automate

Difference of hours between created date from SharePoint list item and UTCNow

Community Center | Not monitored
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-06-18T18:40:18.44+00:00

    Power automate is not currently supported here on Q&A. The product group for Power automate actively monitors questions in dedicated forums here.
    https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  2. Sudipta Chakraborty 1,116 Reputation points
    2022-06-18T18:46:37.467+00:00

    @Pradeep Nemadi :
    To calculate a difference between two dates / times in Power Automate, you must combine multiple expressions. Calculate the number of ticks for each date, and then divide it by a number to get the desired unit. Start from 100 nanoseconds (1 tick) and divide it by a number big enough to get the days/hours/minutes.

    For example, to get the number of hours between yesterday and today:

    div(sub(ticks(utcNow()),ticks(addDays(utcNow(),-1))),36000000000)

    212628-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.