compile function calc_elap(DateIn, TimeIn, DateOut, TimeOut)

Tot = 0
if DateOut and DateIn then
   DateDiff = DateOut - DateIn
   SecondsToAdd = 0
   if DateDiff then
       SecondsToAdd = 86400*DateDiff
   end
   Tans = ( TimeOut + SecondsToAdd ) - TimeIn
   Tot = ( ( Tans /3600) *100 )
end
return Tot

