Validating Dates Based On Selections
Hi, i'm doing a web form which has a section for users to select the dates.
I've got a drop down list for day, month and year respectively. How do i go about validating the dates?
The VALUES for day are 1,2,3,4,5 and so on.
The VALUES for month are 1,2,3,4,5 and so on.
The VALUES for year is 2005.
The "VALUES" stated above refers to the returned value when i do a dropdownlist.SelectedValue()
I've tried using the IsDate function but doesn't get the desired results. I would like to check if the date is valid, if it is not valid, i'll inform the user by informing the user using a label.
Re: Validating Dates Based On Selections
what results did you get with the IsDate function?
You should be able to do this:
VB Code:
If Not IsDate(strMonth & "/" & strDay & "/" & strYear) Then
'display error
End If
Re: Validating Dates Based On Selections
Re: Validating Dates Based On Selections
how do i check if the date selected is later than today's date?
Re: Validating Dates Based On Selections
Quote:
Originally Posted by Lex@SG
how do i check if the date selected is later than today's date?
i've found the ans to my qn....