Function Age(vDate1 As Date, vdate2 As Date) As Integer
If Month(vdate2) < Month(vDate1) Or (Month(vdate2) = _
Month(Bdate) And Day(vdate2) < Day(vDate1)) Then
Age = Year(vdate2) - Year(vDate1) - 1
Else
Age = Year(vdate2) - Year(vDate1)
End If
End Function
Public Function cweek(xx_date As Date)
Dim newyear As Date
newyear = Format(Year(xx_date) & "-01-01", "yyyy-mm-dd")
cweek = Int((xx_date + Weekday(newyear) - newyear - 1) / 7) + 1
End Function