Good Afternoon
Where I can't find info about a counter to convert it in day,hour, min & seconds
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Jul 29, 2008, 7:18 AM
If 'counter' is counting down in seconds, then you can use:
TimeSpan ts = new TimeSpan(0,0, counter);
int days = ts.Days;
int hours = ts.Hours;
int mins = ts.Minutes;
int secs = ts.Seconds;
If it's counting down in milliseconds, then use:
TimeSpan ts = new TimeSpan(0,0, counter/1000);
// etc