public int GetTotalDays(DateTime startedDateTime)
{
//get the current date
DateTime nowDate = System.DateTime.Now;
//use timespan to get the number of days
System.TimeSpan span = nowDate - startedDateTime;
int days = (int)span.TotalDays;
return days;
}
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment