I need a formula to calculate the difference in Hours and Minutes between two times.
Example: Table name = Attandance and the fields that need to be calculated are:
[IN] = 1:15 PM
[OUT] = 1:44 PM.
Show Result 0:29.
Thanks In Advance.
Printable View
I need a formula to calculate the difference in Hours and Minutes between two times.
Example: Table name = Attandance and the fields that need to be calculated are:
[IN] = 1:15 PM
[OUT] = 1:44 PM.
Show Result 0:29.
Thanks In Advance.
local numbervar sec:=datediff("s",{EMP.EMP_INS_YMDHMS},{DEPT.DEPT_INS_YMDHMS});
local numbervar days:=0;
local numbervar hr:=0;
local numbervar min:=0;
local numbervar calc;
calc:=truncate(sec/(24*3600));
days:=calc;
calc:=truncate(sec/3600);
hr:=calc;
calc:=truncate(sec/60);
min:=calc;
sec:=sec mod 60;
totext(days)+"Day "+totext(hr) +"Hrs "+totext(min)+"Min "+totext(sec)+"Sec";