<%Dim strStartDate
Dim intMonth
Dim i
Dim Conn,strSQL,objExec
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("databasestatement.mdb"),"" , ""
strStartDate = Request.Form("st")
intMonth = Request.Form("diff")
For i = 1 To intMonth
Response.write(""&Request.Form("start")&"/"&Request.Form("st")&"/"&Request.Form("st1")&" ")& "<br>"
Next
%>
<%Dim strStartDate
Dim intMonth
Dim i
Dim Conn,strSQL,objExec
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("databasestatement.mdb"),"" , ""
strStartDate = Request.Form("st")
intMonth = Request.Form("diff")
For i = 1 To intMonth
'Response.write(""&Request.Form("start")&"/"&Request.Form("st")&"/"&Request.Form("st1")&" ")& "<br>"
Response.Write(DateAdd("d",i,strStartDate)&"<br>") 'เพิ่มทีละวัน
Response.Write(DateAdd("m",i,strStartDate)&"<br>") 'เพิ่มทีละเดือน
Response.Write(DateAdd("y",i,strStartDate)&"<br>") 'เพิ่มทีละปี
Next
%>