Click here to Skip to main content
15,923,789 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,
i am developing web application in ASp.net, using Custom validation how to validate the from date and To date..

i need to validate the Date in "dd/mm/yyyy" format and i have two date like from date and Todate. So the Todate should not be less then start date, Can anyone please help me,

Thanks in advance.
Posted

in your scripting use this
<br />
If DateValue(sDate) <  DateValue(eDate) Then<br />
 datevalid=true<br />
end if<br />


if your using a HTML form to enter the 2 dates into text boxes then to get it into variables use
<br />
sDate= Request.form("sDate")<br />
eDate= Request.form("eDate")<br />
<br />

hope this helps

yes it is a inbuild function for asp using vbscripting
 
Share this answer
 
v4
is the method "DateValue" is java script inbuild function..?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900