Seconds to Time

D

david.pope

Does the .Net framework provide a method to convert seconds into a readable
time format?

Thanks,

D
 
N

Nicholas Paldino [.NET/C# MVP]

David,

You can use the static FromSeconds method to create a TimeSpan instance.
At that point, you can just use the ToString method to produce a string that
represents that amount of time (days, hours, minutes, seconds).

Hope this helps.
 
D

david.pope

You the man!

Thanks,

D
Nicholas Paldino said:
David,

You can use the static FromSeconds method to create a TimeSpan
instance. At that point, you can just use the ToString method to produce a
string that represents that amount of time (days, hours, minutes,
seconds).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

david.pope said:
Does the .Net framework provide a method to convert seconds into a
readable time format?

Thanks,

D
 

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

Top