web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Date difference betwee...
Power Automate
Answered

Date difference between 2 dates in minutes

(0) ShareShare
ReportReport
Posted on by 21

Hello,

 

I have a column of "SLA1 Time" in list and this time is stored in a list when approver approves the task. I want to calculate the difference between "SLA1 Time" and "when item is created" and stored this difference in another column named "SLA". how can I do this. Kindly help me. 

 

Capture.JPG

Categories:
  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @mirtiza 

    Please, have a look at this thread: https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-get-difference-between-two-dates-in-flow/td-p/283186 where @v-xida-msft posted and excellent solution.

    Basically you can use the ticks function to get the number of ticks of a datetime value, for example:

    ticks(triggerBody()?['Created'])

     And then, calculate the difference between to two columns like this:

    div(div(mul(sub(outputs('EndTimeTickValue'),outputs('StartTimeTickValue')),100),1000000000),60)

     Where StartTimeTickValue and EndTimeTickValue are the variables where you stored your times (item created and SLA1 time).

    Hope it helps!

    Ferran

  • mirtiza Profile Picture
    21 on at

    Hi @fchopo 

     

    Thanks for replying, Here is my flow

     

    3.JPG

     

    I tried this solution i am having this error.

    1.JPG

     

     

    2.JPG

     

  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @mirtiza 

    It seems you are trying to update a DateTime column with a string value. Is the SLA column an integer or string one?

    Hope it helps!

    Ferran

  • Verified answer
    v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @mirtiza ,

     

    Could you please share a screenshot of the configuration of the Update item 7 action?

    I don't see the SLA column in your Update item7, what is the type of the SLA column?

    Does the Updated item 7 action failed for the SLA column? or failed for the SLA1 Time column? Could you please share the full error message for the Update item 7 action?

     

    I'm afraid that you have update the SLA1 Time column with the ticks expression so the Update item 7 run failed, please make sure that you have updated the SLA1 Time column with the time instead of the ticks expression.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard