How to convert seconds into hh:mm:ss in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
        Dim time As TimeSpan = TimeSpan.FromSeconds(19208)
		
        Dim str As String = time.ToString("hh\:mm\:ss")
		
        Console.WriteLine(str)
    End Sub
End Class



' run:
'
' 05:20:08
'

 



answered May 1, 2022 by avibootz

Related questions

1 answer 231 views
231 views asked May 1, 2022 by avibootz
1 answer 192 views
1 answer 261 views
1 answer 257 views
1 answer 234 views
1 answer 221 views
1 answer 234 views
...