Find Hours, munites and seconds from seconds

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

How to find how many hours, minutes and seconds a given number of
seconds is?

For example, if you got 3460 seconds, that would be 0 hours, 57 min and
40 seconds.

Any idea how to calculate this from code?

TIA
 
Nikolay Petrov said:
How to find how many hours, minutes and seconds a given number of
seconds is?

\\\
Dim t As TimeSpan = TimeSpan.FromSeconds(1234)
MsgBox(t.Hours.ToString())
MsgBox(t.Minutes.ToString())
MsgBox(t.Seconds.ToString())
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top