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 / Calculating the durati...
Power Automate
Answered

Calculating the duration of a meeting in Outlook and converting to a number of hours to 2 decimal places

(0) ShareShare
ReportReport
Posted on by 16

Hi folks,

 

First up, I am very much a layman when it comes to this and have had some success in learning as I stumble through Power Automate. I am very much in awe of the level of knowledge here and has already been useful!

 

I have created a recurring flow that will grab all of the events/meetings in my M365 Outlook calendar for the upcoming week and populate it into MS Lists and for most of the attributes I want to import, this works really well.

Where I am really struggling is calculating the duration of a given meeting, in hours, and reporting this as a number to 2 decimal places into my list into the budgeted hours field (in red below). I can already add in numbers when I manually add in new entries in the list.

 

RobElliott1_0-1688063724770.png

I have become totally stuck on this so any help as to how I would go about this is appreciated.

Is it possible to include the "Start Time" and "End Time" fields from Outlook in the Dynamic Content area to be used in an expression and what's the general syntax for that? I have been trying to use div and sub expressions but having no joy at all!

 

Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    You can use the dateDifference() expression and then split out the hours or minutes from the string. OR You could also use a ticks() expression and formula.

     

    I think the ticks() expression would work better for you, since you need a final number for billable hours. 

     

     

    Here is a reference. It looks long, but mainly because it is detailed. Scan through it and you should be able to see how to get what you want.

    https://powerusers.microsoft.com/t5/General-Power-Automate/Using-the-dateDifference-expression-or-ticks-to-find-difference/m-p/2195863#M129167

     

    This will get the hours difference with decimal result.

     

    div(sub(float(ticks({EndDateTime})),float(ticks({StartDateTime}))),36000000000)

     

     

    Note: This is for full DateTime fields. It doesn't work for Time only fields. 

    If you have a Time only field, then you should put it together with the date to make a full DateTime field.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard