B4X:
Sub MinutesToTime(mins As Int) As String
'Converts integer minutes to a time string 'HH:MM'
Dim H As Int
Dim M As Int
H = mins/60
M = mins Mod 60
Log(M) 'apparently 800 MOD 60 = 19 not 20 ???
Return NumberFormat(H,2,0) & ":" & NumberFormat(M,2,0)
End Sub
This function appears to work 99% of the time. However when mins = 800 the function returns '13:19' instead of '13:20'...........
Why?