Could someone plz help?
I am trying to do age conversion
Enter DOB and find out if the age is 21 or not (date should be mm/dd/yyyy)
I'm sure I have something in here I don't really need
But, Here goes

Dim BirthDate As Integer
Dim Answer As Integer
Dim dteDateOne As Date
Dim dteDateTwo As Date

lblAnswer.Text = BirthDate

'BirthDate() = Split("/")?????/how do I do this????
'Get the diference in year
'? about next line

BirthDate = DateDiff(DateInterval.Month, dteDateOne, dteDateTwo) / 12

BirthDate = Val(txtBirthDate.Text)

If BirthDate > 87 Then
lblAnswer.Text = "Busted"
End If


If BirthDate <= 86 Then
lblAnswer.Text = "Drink Up"
End If


End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click

txtBirthDate.Text = ""
lblAnswer.Text = ""

End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
End

End Sub

End Class

Please post your thread on current section. This Post for vb.net section.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.