var today = DateTime.Now; // 2017-05-29
var birthday = new DateTime(1988, 2, 26);
var age = (int)(today - birthday / 10000); // 29
Created
May 29, 2017 06:50
-
-
Save Dalstroem/21c5dd2d8fb92479969318085d0dd7c6 to your computer and use it in GitHub Desktop.
Calculate age
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment