here is a routine I made, because I just can't make out what you want to do. This will convert a number of minutes, to week,day, hour, minute, considering that 1 week has 5 days, 1 day has 8 hours and 1 hour has 60 seconds.

function inttotimestr(s:integer):st

var w,d,h,m:word;

begin

w:=s div (5*8*60);// 5 days with 8 hours having 60 min

s:=s mod (5*8*60);

d:=s div (8*60);

s:=s mod (8*60);

h:=s div 60;

m:=s mod 60;

result:=format('%d:%.2d:%.

end;