Hi all,
sorry for so many posts but honestly this will be the last (I hope). Two dateTime fields and i have to work out the difference, the two fields are @timeoncall and @timeoncall3. I have tried a few methods and keep getting 0:00 as the result, the two fields show:
@timeoncall - 13:03:13
@timeoncall3 - 13:04:40
I have tried the following and can't seem the find the problem, the answer I get is 00:00
Numbervar H :=0;
Numbervar M :=0;
numbervar S :=0;
Stringvar hr :="";
Stringvar mn :="";
Stringvar ss :="";
Stringvar totaltime :="";
S:=(time({@timeoncall})-(Time({@timeoncall3})));
M:= truncate(S/60);
if (S>59) then S:=remainder(S,60);
H:= truncate (M/60);
if (M>59) then M:= remainder (M,60);
hr:=totext(H,"00");
mn:=totext(M,"00");
ss:=totext(S,"00");
totaltime:=(hr+":"+mn);
totaltime
any help would be appricated
Thanks
G
sorry for so many posts but honestly this will be the last (I hope). Two dateTime fields and i have to work out the difference, the two fields are @timeoncall and @timeoncall3. I have tried a few methods and keep getting 0:00 as the result, the two fields show:
@timeoncall - 13:03:13
@timeoncall3 - 13:04:40
I have tried the following and can't seem the find the problem, the answer I get is 00:00
Numbervar H :=0;
Numbervar M :=0;
numbervar S :=0;
Stringvar hr :="";
Stringvar mn :="";
Stringvar ss :="";
Stringvar totaltime :="";
S:=(time({@timeoncall})-(Time({@timeoncall3})));
M:= truncate(S/60);
if (S>59) then S:=remainder(S,60);
H:= truncate (M/60);
if (M>59) then M:= remainder (M,60);
hr:=totext(H,"00");
mn:=totext(M,"00");
ss:=totext(S,"00");
totaltime:=(hr+":"+mn);
totaltime
any help would be appricated
Thanks
G