on twodigit(f)
if f < 10 then
return "0" & f as string
else
return f
end if
end twodigit
set mins to 0
display dialog "Convert total minutes to HH:MM" default answer mins
set mins to text returned of result
set H to mins div 60
set M to mins mod 60
set Hstring to twodigit(H)
set Mstring to twodigit(M)
display dialog Hstring & ":" & Mstring