|
i just want to ask, i have 2 text boxes, i put the first date in the first box and the second date in the second textbox.How can i get the dates from the two given dates
sample:
1/5/2003 and 1/10/2003
i want to get
1/5/2003
1/6/2003
1/7/2003
1/8/2003
1/9/2003
1/10/2003
pls. help
thanks
|
|
|
hello diego,
i`m design on my own and it`ll work with any date you insert
between this 2 textbox.
consider format for 1/5/2003 is mm/dd/yyyy
below are sample from me :
1. create file Date.html
<html>
<body>
<form name=form1 method=post action="/forum/getDate.html">
START
<input type="text" name=text1 value="1/5/2003">
FINISH
<input type="text" name=text2 value="1/10/2003">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
2. create file getDate.asp
<%
`Contribute from Yusairi
`Subject : View the selected duration date
`feel free to visit http://www.vss.com.my
date1 = CDATE(request.form("text1"))
date2 = CDATE(request.form("text2"))
day1 = day(date1)
mth1 = month(date1)
year1 = year(date1)
day2 = day(date2)
mth2 = month(date2)
year2 = year(date2)
difdate = date2 - date1
maxdate = date1 + difdate
i=0
do while i <= difdate
tempdate = date1 + i
response.write tempdate & "<br>"
i = i + 1
loop
`Finish Code
%>
GOOD LUCK...
|
|
|
|
|
|
|
|
|
|
|
|