Agenda
<%
if request("fecha")="" then
d=day(Date())
m=Month(Date())
y=Cstr(Year(Date()))
response.write Ucase(Monthname(m))&" de "&Ucase(y)
else
d=day(Date())
m=Month(request("fecha"))
y=Cstr(Year(request("fecha")))
response.write Ucase(Monthname(m))&" de "&Ucase(y)
end if
%>
|
<%
set Conn=Server.CreateObject("ADODB.Connection")
set RSList=CreateObject("ADODB.Recordset")
Conn.Open "dsn=Turismo;uid=Gestor;pwd=;"
if request("fecha")="" then
RSList.Open "Select * from Agenda where fecha>=#"&d&"/"&m&"/"&y&"# order by fecha asc;", Conn, 3,3
else
x=31
if m=2 then x=28
if m=4 then x=30
if m=6 then x=30
if m=9 then x=30
if m=11 then x=30
RSList.Open "Select * from Agenda where fecha<=#"&x&"/"&m&"/"&y&"# and fecha>=#1/"&m&"/"&y&"# order by fecha asc;", Conn, 3,3
response.write "Select * from Agenda where fecha<=#"&x&"/"&m&"/"&y&"# and fecha>=#1/"&m&"/"&y&"# order by fecha asc;"
end if
do while not Rslist.Eof
%>
<%
Rslist.Movenext
loop
%>
|