Calculating Service Delays Using the 'Duration' Field in Proposals

Hello,
I created an additional field in the proposals (called “Duration”)
I want to calculate the delay for an automatic service


Duration = time end service - time start service
to calculate Total HT = P.U H * Qty * Duration