Question:

vb6.0 calculate age from date of bitrh how to get age in vb using dtpicker

by Guest4745  |  12 years, 11 month(s) ago

1 LIKES UnLike

how to get age in vb using dtpicker

 Tags: age, bitrh, calculate, date, vb6.0

   Report

1 ANSWERS

  1. Guest6198
    Try following function to perform this...

    Function CalcAge(Birthday As String) As Integer

    Dim YearDay As Date

    If Val(Format(Birthday, "y")) > Val(Format(Date, "y")) Then
    YearDay = DateAdd("yyyy", 1, (Birthday))
    Else
    YearDay = Birthday
    End If

    CalcAge = DateDiff("yyyy", YearDay, Date)

    End Function

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 14 years, 9 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions