How to calculate the task age in asp.net usinf c# means the difference between the Assigned date selected for task and the current date.
问问题
702 次
1 回答
0
Ultimtly you want difference between two dates , which you can get as below
System.DateTime dtStartDate = new System.DateTime(2012, 9, 13, 12, 0, 0);
System.DateTime dtEndDate = new System.DateTime(2012, 9, 13, 0, 0, 0);
System.TimeSpan diffResult = dtEndDate.Subtract(dtStartDate);
Console.WriteLine("StartDate - EndDate = " + diffResult.TotalDays);
于 2012-04-27T04:35:03.267 回答