How Can I used the Datediff function for HH:MM Calculation I need two date field duration as HH:MM

Hi Team, I have a Job Start Date field & Job End Date field I want the Elapsed Time so I take the calculation as Datefdiff(Job Start Date, Job End Date, ‘HH’) as per formula we put only HH or MM not both so how can I achieve the Elapsed Time as HH:MM

I would take the seconds difference and convert it to HH:MM afterwards.

Datefdiff(Job Start Date, Job End Date, ‘SS’)

Then run it through this conversion

But @Max how can I used this as measure once I do this calculation then the entire things going to be a dimension field but my requirement is make the column as Measure column.

You cannot. It will be a string.

You might look to make it a number by having HH.MM

In that case, you would round your HH to an integer as well as round the MM to an integer but divide by 10 and then add them together.

Hi @Max thanks for your answer can you give a simple calculation so that i will replicate the same in my end.

round(ifelse({Average Talk Time} / 3600 < 10,floor({Average Talk Time} / 3600),(floor({Average Talk Time} / 3600))),0) + round(ifelse(({Average Talk Time} % 3600)/60 < 10,floor(({Average Talk Time} % 3600)/60),floor(({Average Talk Time} % 3600)/60),0)/10

1 Like

Thanx @Max I am going to replicate the same in my calculation.

1 Like