|
-
Feb 18th, 2005, 11:17 AM
#1
Thread Starter
Member
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.
Last edited by Lex@SG; Feb 20th, 2005 at 12:07 PM.
Reason: Ans Found!
-
Feb 18th, 2005, 12:45 PM
#2
Addicted Member
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
-
Feb 18th, 2005, 11:20 PM
#3
Thread Starter
Member
Re: Validating Dates Based On Selections
-
Feb 20th, 2005, 11:54 AM
#4
Thread Starter
Member
Re: Validating Dates Based On Selections
how do i check if the date selected is later than today's date?
-
Feb 20th, 2005, 12:07 PM
#5
Thread Starter
Member
Re: Validating Dates Based On Selections
 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....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|