SuiteCRM: duration calculation

I have to calculate the duration of a phone call. I have the start time and the end time. I’m interested in how many hours and minutes it lasted. I am trying in several ways but to no avail. Can anyone help me? I have to do this in a personal module

@rs_crm2021

Welcome to the community!

You can use two variants, look at documentation:


Hello, I tried with the datediff formula but it doesn’t work. While with the logic hooks I have not tried because I don’t know how it works yet. I was looking for some examples if someone has already done it.

@rs_crm2021

I didn’t heard about mistake in the function. There is an example of the function: https://docs.suitecrm.com/user/advanced-modules/workflow-calculated-fields/#_datediff
Documentation about logichooks has enough details if you know PHP.