About EasyMorph Tutorials & Examples Web-help

How to format the duration in more than 24h

I’ve an issue. I need to calculate a column with the difference between two dates (duration) and it should be calculated in hours. The problem is because I have many cases where the duration is greater than 24h.

begin: 10/02/2019 10:00:00 (dd/MM/yyyy HH:mm:ss)
end: 15/02/2019 08:00:00 (dd/MM/yyyy HH:mm:ss)

duration: 118 hours.

Anybody has some ideas to help me?

Thanks in advance

A simple formula (end-begin)*24 should be OK…

Quite simple! I was looking for a different way to show this duration in terms of hours (more than 24), minutes and seconds but your suggestion is very simple and works as well.

Thanks a lot.

What format did you expected?

Thanks for help. I expected to format the duration time like excel does using one of available predefined formats. Please see the picture.

Thanks for helping.

Sorry, I don’t find a straightforward solution, without formulas.

Maybe the community can help

There is no duration formatting in EasyMorph. A formatted duration text string have to be calculated using expressions. See the example below.

formatted duration.morph (3.4 KB)

Learning “padstart” function.
Happy of the new functionalities of the 4.2 version.

To learn more about EasyMorph visit easymorph.com.