Forum Discussion
kenblack
6 years agoHelper I
calculating duration
I have two columns both in the following format 04/06/2020 05:02:00 so dd/mm/yyyy hh/mm/ss and I would like to subtract one from the other to get the duration in hrs - can anyone help please ...
- 6 years ago
Use the Duration.TotalHours() function in Power Query. Just subtract column 1 from column 2. It will return total and fractional hours.
If you just need hours, round it using Number.Round(formula, 0)
edhans
6 years agoCommunity Champion
Use the Duration.TotalHours() function in Power Query. Just subtract column 1 from column 2. It will return total and fractional hours.
If you just need hours, round it using Number.Round(formula, 0)