title: How can I get hh:mm:ss to display in just seconds in vb.net
body: <p>I have tried to get vb.net to display the running time which worked in the format hh:mm:ss. I want to get it to display in just seconds could I get help?
  So for example if it was 10:00:00 am, then that would be 10 * 60 * 60. However the time would automatically continue and if say the time was 10:19:23 am then what would I do?</p>
  
  <p>My code:</p>
  
  <pre><code>Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
      Label2.Text = Format(Now, "HH:mm:ss")
  End Sub
  
  Private Function GetSeconds(ByVal timestamp As DateTime) As Integer
  
      Dim timespan As TimeSpan = Now - timestamp
      Return (timespan.TotalSeconds)
  
  End Function
  </code></pre>