How to Convert Duration data type into hours

Hi

Duration data type is normally difference between two datetime data type you can convert to date and get the difference of start and end time for example, but DT2Date will omit the time part and give you the integer output

ProcessStart := CREATEDATETIME(010109D,072005T);
ProcessEnd := CREATEDATETIME(300109D,103000T);
StartDate:= DT2DATE(ProcessStart);
EndDate := DT2DATE(ProcessEnd);
MESSAGE(’%1’,(EndDate-StartDate));