07-29-2008, 07:19 PM
Check this , i hope it's usefull for u
Code:
strBirthDate="10/10/2000"
vmonth = dateDiff("m",strBirthDate, date())
vday= datediff("d", strBirthDate, date())
If month(Now()) > month(strBirthDate) OR month(Now()) = month(strBirthDate) Then
If day(strBirthDate) = day(Now()) OR Day(Now()) > day(strBirthDate)Then
vyear = DateDiff("y", year(strBirthDate), year(Now()))
else
vyear = DateDiff("y", year(strBirthDate), year(Now())) - 1
end if
else
vyear = DateDiff("y", year(strBirthDate), year(Now())) - 1
End If
msgbox "Year::"& vyear