open-insight/LSL2/STPROC/CALC_ELAP.txt
Infineon\StieberD 7762b129af pre cutover push
2024-09-04 20:33:41 -07:00

15 lines
320 B
Plaintext

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