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 151 views
151 views asked May 1, 2022 by avibootz
1 answer 115 views
1 answer 176 views
1 answer 176 views
1 answer 140 views
1 answer 146 views
1 answer 149 views
...