/ Published in: Visual Basic

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Public Function Age(ByVal DoB As Date) As Byte Dim Birthday As Date Birthday = DateSerial(Year(Now()), Month(DoB), Day(DoB)) Age = Year(Now()) - Year(DoB) If Birthday > Now() Then Age = Age - 1 End Function
Comments
