[RobDog's Friend] | | KB Article | Title: | Birthday diplayed as age | | Texts | Description: | This little function returns the "age" of the date passed. This would be used to get someone's age to display or verify within a specific age range (e.g. For access). | Code / Script: | Private Function Age(ByVal Birthday As DateTime) As Integer
Dim year As Integer = Today.Year - Birthday.Year
If Today.Month < Birthday.Month Or (Today.Month = Birthday.Month And Today.Day < Birthday.Day) Then
Return year - 1
Else
Return year
End If
End Function | | Misc | | | No associations | |
|