using System.TimeSpan |
| sundar k replied to divya rocks at 08-May-08 03:42 |
System.TimeSpan TS = new System.TimeSpan(EndDate.Ticks - StartDate.Ticks);
Where StartDate and EndDate are of type System.DateTime
You can get the difference in days/Hours/minutes/seconds using TS.Days or TS.TotalHours or Ts.TotalHours etc.,
check thebelow link for more info,
http://www.dotnetspider.com/resources/1134-DateDiff-c.aspx |
|