I have the following inside my asp.net mvc web application:-
scan.StartDate = System.DateTime.Now;
//do long job....
scan.EndDate = System.DateTime.Now;
var duration = (scan.EndDate - scan.StartDate);
now the duration will be something such as 00:00:50.0250000
so my question is how i can truncate the miliseconds and show only hour:minute:seconds ?