Question:

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

by Guest11860828  |  2 years, 4 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. Tayyab
    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

Question Stats

Latest activity: 2 years, 4 month(s) ago.
This question has been viewed 791 times and has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.