Calculate age as years, month & days
In following Code Segment will calculate age and returns Age as YEARS, MONTH, and DAYS. Input to this function is Date of Birth.
public bool GetAge(DateTime DOB, out int Years, out int Month, out int Days)
{
if (DOB > DateTime.Now)
{
TimeSpan dateDiff = DateTime.Now - DOB;
DateTime age = new DateTime(dateDiff.Ticks);
Years = age.Year - 1;
Month = age.Month - 1;
Days = age.Day - 1;
return true;
}
else
{
return false;
}
}

You can also try below code snippet for Calculate Age