Posted By

Joshnolan118 on 02/25/09


Tagged

AGE vb6 flurk DateofBirth


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

brent-man


vb6 - Age - Find Age from DateOfBirth


 / Published in: Visual Basic
 

  1. Public Function Age(ByVal DoB As Date) As Byte
  2. Dim Birthday As Date
  3. Birthday = DateSerial(Year(Now()), Month(DoB), Day(DoB))
  4. Age = Year(Now()) - Year(DoB)
  5. If Birthday > Now() Then Age = Age - 1
  6. End Function

Report this snippet  

You need to login to post a comment.