I have a Timespan that I need to output in a particular format as shown below :-
TimeSpan TimeDifference = DateTime.Now - RandomDate;
I'm formatting the TimeSpan like this :-
string result = string.Format(@"{0:hh\:mm\:ss}", TimeDifference);
The Result will look something like this :-
"00:16:45.6184635"
How do I round those seconds to 0 decimal places?
Expected Result = 00:16:46
Thanks