Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27470

VS 2012 [RESOLVED] Timespan format

$
0
0
How can I format a timespan to display the days as well as hours, minutes and seconds?

Here is my code that works without the days:

Code:

ToolStripNextPlayTime.Text = "Time until ScheduleList Start: " & String.Format("{0:00}:{1:00}:{2:00}", ts.Hours, ts.Minutes, ts.Seconds)
Here is some code that I have tried, with no luck:

Code:

ToolStripNextPlayTime.Text = "Time until ScheduleList Start: " & String.Format("{0:00}:{0:00}:{1:00}:{2:00}", ts.Days, ts.Hours, ts.Minutes, ts.Seconds)

Viewing all articles
Browse latest Browse all 27470

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>