KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm looking for a solution in .net 3.5 I wrote the following working solution: private string FormatTimeSpan(TimeSpan time) { return String.Format("{0}{1:00}:{2:00}", time < TimeSpan.Zero ? "-" : "", Math.Abs(time.Minutes), Math.Abs(time.Seconds)); } But my Question is: Is there a better way? Maybe something shorter where I do not need an helper function.
Tags (comma-separated)
Save Edits
Cancel