Question: how to calculate age in years months and days in c#?
Answer: public void Display() { DateTime date = DateTime.Now; System.DateTime BirthDate = new System.DateTime(1991, 9, 11, 0, 0, 0); System.TimeSpan diffResult = date.Subtract(BirthDate); string TotalDays = diffResult.Days.ToString(); string Months = ((diffResult.Days) % 365).ToString();