Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total Hours

Seems like this should be an easy one. I have two dates [EventDate] and [EndDate] that I need subtracted for hours worked. These hours could go from 11pm  to 3am the next day. 


For reporting purposes in PowerApps charts and total month/year, I am looking for a final result as a number field. 


I can get the numbers I am looking for as a calculated field within a SharePoint list, but the calculated fields as a number format do not seem to work with the reporting I am trying to accomplish in with other calculations for reporting. 


My first step was to convert both start and end using this. formatdatetime(triggerBody()?[EventDate],'HH:mm')

With those results, I thought I could just use an expression to subtract the two with an output as a number format and not a text.


This link is great for SharePoint, but I am looking for a step further when using Flow and PowerApps.


So I think I just need a start date - end date = total as a number format. 


Community Support
Community Support

Hi msmith,


Microsoft flow uses workflow definition language to work with parameters. But it seems that currently there is no function can be used to count hours between two days.

The doc on workflow definition language for your reference:

Please consider submitting a request at Flow ideas Forum at here, I will help collect and report it on my side:


Best regards,
Mabel Mao

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


Have you tried translating the dates to be compared into ticks? The general procedure for comparing dates is described in the following thread:


Once you get the difference in ticks you shall convert it into hours. Given a timestamp in string format, the ticks() expression returns the number of ticks (100 nanosecond intervals) since 1st January, 1601. By using ticks, we can compare two different timestamp values.


Hope this helps

Each time you click on any of our inspiring answers 'Thumb up' icon... ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!

Escribo sobre Power Automate en:

Proud to be a Flownaut!

Helpful resources

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (1,415)