I use this function:
Function DRazlika(dStartDate,cStartTime,dEndDate,cEndTime)
Return (((dEndDate - dStartDate) * 86400) - TimeToSec(cStartTime)) + TimeToSec(cEndTime)
... and in PRG code is somethnig like this
//*** End_Time, Start_Time are string ("12:15", "13:15")
    dd2 :=alltrim(End_Time)
    dd1 :=alltrim(Start_Time)
    dd3 :=DRazlika(@StartDate,@dd1,@End_Date,@dd2)   //*** Return dd3 in seconds
    dd4 :=int(dd3/86400)              //*** No of days
    dd5 :=dd3-(dd4*86400)            Â
    dd6 :=int(dd5/3600)               //*** No in hours
    dd7 :=(dd5-dd6*3600)/60           //*** rest in minutes
...
...
 @ row ,4 say "Result: "+str(dd4,2)+" days "+str(dd6,2)+" hours "+str(dd7,2)+" min"
Regards
Zupan Miran
Slovenia