This code should work in both .NET and VB6:
Dim hours As Integer = 538 \ 60 Dim minutes As Integer = 538 - (hours * 60) Dim timeElapsed As String = CType(hours, String) & ":" & CType(minutes, String) label1.Text = timeElapsed
In .NET exclusively, you should be able to do the following (which requires verification):
Dim timeElapsed As DateTime = New DateTime(1, 1, 1, 0, 538, 0) label1.Text = timeElapsed.ToString("HH:mm")
Hope this helps!
Will marcouiller
source share