Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

1 total

On This Page:

  1. 1 asp :: calculate age

asp :: calculate age

asp :: calculate age

Function Age(ByVal dtBirthDate As Date) As Integer
    Dim intAge As Integer
    intAge = DateDiff(DateInterval.Year, dtBirthDate, Today())
    If Today() < DateSerial(Year(Today()), Month(dtBirthDate), Day(dtBirthDate)) Then
        intAge = intAge - 1
    End If
    Return intAge
End Function 
1 total

On This Page:

  1. 1 asp :: calculate age