Wie schon im Titel, aus Sekunden wird hh:mm:ss
Public Function SecToTime(ByVal Seconds As Long, Optional ByRef rHour As Long = 0, Optional ByRef rMinute As Long = 0, Optional ByRef rSecond As Long = 0) As String
rHour = (Seconds \ 3600)
rMinute = (Seconds - (rHour * 3600)) \ 60
rSecond = (Seconds - (rHour * 3600) - (rMinute * 60))
SecToTime = Format(rHour, "00") & ":" & Format(rMinute, "00") & ":" & Format(rSecond, "00")
End Function
1 Kommentare zum Snippet