anyone know how to get the age based on a date(birthdate)
im thinking of something like this
string age = DateTime.Now.GetAccurateAge();
I find this the most accurate.
private int GetAge(DateTime birthDate) { TimeSpan ageTimeSpan = DateTime.UtcNow.Subtract(birthDate); int age = new DateTime(ageTimeSpan.Ticks).Year; return age; }