Skip to content

Instantly share code, notes, and snippets.

@wingedpanther
Created November 19, 2015 11:34
Show Gist options
  • Save wingedpanther/8b64583b4fad1e2c5a91 to your computer and use it in GitHub Desktop.
Save wingedpanther/8b64583b4fad1e2c5a91 to your computer and use it in GitHub Desktop.
Public Function CALCULATE_AGE(ByVal dob As Date) As Integer
Dim age As Integer
age = Today.Year - dob.Year
If (dob > Today.AddYears(-age)) Then age -= 1
Return age
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment