chowchow123
Active member
- Joined
- Sep 6, 2007
- Messages
- 34
- Programming Experience
- 1-3
Hi
I want to convert from date to age - I tried the code below but it doesn't work
Private Sub AgeTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AgeTextBox.TextChanged
AgeTextBox = DateDiff("yyyy", [DOBDateTimePicker], Now()) + _
Int(Format(Now(), "mmdd") < Format([DOBDateTimePicker], "mmdd"))
End Sub
I want to convert from date to age - I tried the code below but it doesn't work
Private Sub AgeTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AgeTextBox.TextChanged
AgeTextBox = DateDiff("yyyy", [DOBDateTimePicker], Now()) + _
Int(Format(Now(), "mmdd") < Format([DOBDateTimePicker], "mmdd"))
End Sub