Page 1 of 1

Converting seconds to HH:MM:SS

Posted: Wed Jan 15, 2014 5:13 pm
by AnoPem
This tutorial will teach you how to convert seconds to hour minutes and seconds

You will need 1 label and 1 button
add the code below to the button

heres the code
Code: Select all
        Dim count = TimeSpan.FromSeconds(150)
        Label1.Text = String.Format("{0:hh\:mm\:ss}", count)
Image

Add this code to your button or whatever and change the value in FromSeconds to the seconds you want it to show as hours minutes and seconds