problemas con calendario

20/05/2004 - 00:47 por José M. Sánchez | Informe spam
Hola amigos, de vuelta estoy con el tema. Trato de hacer un calendario en
asp, he cogido un código de calendario muy bueno y facil (asptutor), donde
cada día tiene un link que te puede llevar a una asp de resultados.
El problema es que que los datos los tengo en Access, y el formato de fecha
es dd/mm/aaaa hh:mm:ss

y si quiero que el link que me da un request hacia:
calendario.asp?day'&month=5&year 04 por ejemplo.

como puedo poner la conexión con la bd para que me recoja la fecha en esos
tres números, osea, día, mes y año?
Yo lo he intentado así:

día:<%=Day(listado.fields("Date"))
mes:<%=Month(listado.fields("Date"))
ano:<%=Year(listado.fields("Date"))
consulta ="Select * from tblQuestion where
dia='"+Request.QueryString("day")+"'&mes='"+Request.QueryString("month")+"'&
ano='"+Request.QueryString("year")+"' ORDER BY Date"

listado.Open consulta,Conn,2,2
If listado.BOF And listado.EOF Then %>
No hay ninguna fecha
<% Else
While Not listado.EOF%>



<%listado.MoveNext
Wend
end if
listado.close%>

Pero me sale error

- El código de calendario.asp es muy sencillo, y si os interesa os lo pongo
a continuación.
Espero vuestra respuesta pues me urge mucho para mi web
http://www.alfeizar.net

calendario.asp

<%@ Language=VBScript %>
<%
'pagina que recibirá la fecha seleccionada por el usuario
Const URLDestino = "calendario.asp"

Dim MyMonth 'Month of calendar
Dim MyYear 'Year of calendar
Dim FirstDay 'First day of the month. 1 = Monday
Dim CurrentDay 'Used to print dates in calendar
Dim Col 'Calendar column
Dim Row 'Calendar row

MyMonth = Request.Querystring("Month")
MyYear = Request.Querystring("Year")

If IsEmpty(MyMonth) then MyMonth = Month(Date)
if IsEmpty(MyYear) then MyYear = Year(Date)

Call ShowHeader (MyMonth, MyYear)

FirstDay = WeekDay(DateSerial(MyYear, MyMonth, 1)) -1
CurrentDay = 1

'Let's build the calendar
For Row = 0 to 5
For Col = 0 to 6
If Row = 0 and Col < FirstDay then
response.write "<td>&nbsp;</td>"
elseif CurrentDay > LastDay(MyMonth, MyYear) then
response.write "<td>&nbsp;</td>"
else
response.write "<td"
if cInt(MyYear) = Year(Date) and cInt(MyMonth) = Month(Date) and
CurrentDay = Day(Date) then
response.write " class='calCeldaResaltado' align='center'>"
else
response.write " align='center'>"
end if
response.write "<a href='" & URLDestino & "?day=" & CurrentDay _
& "&month=" & MyMonth & "&year=" & MyYear & "'>"
if cInt(MyYear) = Year(Date) and cInt(MyMonth) = Month(Date) and
CurrentDay = Day(Date) then
Response.Write "<div class='calResaltado'>"
else
Response.Write "<div class='calSimbolo'>"
end if
Response.Write CurrentDay & "</div></a></td>"
CurrentDay = CurrentDay + 1
End If
Next
response.write "</tr>"
Next
response.write "</table></body></html>"


' Sub and functions


Sub ShowHeader(MyMonth,MyYear)
%>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<style>
.calFondoCalendario {background-color:white}
.calEncabe {font-family:Arial, Helvetica, sans-serif; font-size:11px}
.calFondoEncabe {background-color:white}
.calDias {font-family:Verdana, Helvetica, sans-serif; font-size:9px;
font-weight:900}
.calSimbolo {font-family:Verdana, Helvetica, sans-serif; font-size:11px;
text-decoration:none; font-weight:200; color:blue}
.calResaltado {font-family:Verdana, Helvetica, sans-serif; font-size:11px;
text-decoration:none; font-weight:700}
.calCeldaResaltado {background-color:yellow}
</style>
<title>C A L E N D A R I O</title></head>

<body bgcolor='#FFFFFF'>

<table border='1' cellspacing='3' cellpadding='3' class="calFondoCalendario"
style="border-collapse: collapse" bordercolor="#111111">
<tr align='center'>
<td colspan='7'>
<table border='0' cellspacing='1' cellpadding='1' width='100%'
class="calFondoEncabe">
<tr>
<td align='left'>
<%
response.write "<a href = 'calendario.asp?"
if MyMonth - 1 = 0 then
response.write "month&year=" & MyYear -1
else
response.write "month=" & MyMonth - 1 & "&year=" & MyYear
end if
response.write "'><span class='calSimbolo'><<</span></a>"
response.write "<span class='calEncabe'> <b>" & MonthName(MyMonth) &
"</b> </span>"
response.write "<a href = 'calendario.asp?"
if MyMonth + 1 = 13 then
response.write "month=1&year=" & MyYear + 1
else
response.write "month=" & MyMonth + 1 & "&year=" & MyYear
end if
response.write "'><span class='calSimbolo'>>></span></a>"%>
</td>
<td align='center'>
<%
response.write "<a href = 'calendario.asp?"
response.write "month=" & Month(Date()) & "&year=" & Year(Date())
response.write "'><div class='calSimbolo'><b>Hoy</b></div></a>"
%>
</td>
<td align='right'>
<%
response.write "<a href = 'calendario.asp?"
response.write "month=" & MyMonth & "&year=" & MyYear -1
response.write "'><span class='calSimbolo'><<</span></a>"

response.write "<span class='calEncabe'> <b>" & MyYear & "</b>
</span>"
response.write "<a href = 'calendario.asp?"
response.write "month=" & MyMonth & "&year=" & MyYear + 1
response.write "'><span class='calSimbolo'>>></span></a>"
%>
</td>
</tr>
</table>
</td>
<td rowspan="8">
sssssss kjdakjda kjjkj kjj kjkjkkj<p>opooipda poioppi</p>
<p>opàdàdpo oo`p</p>
<p>`da`da`poad`poda`poda</td>
</tr>
<tr align='center'>
<td><div class='calDias'>D</div></td>
<td><div class='calDias'>L</div></td>
<td><div class='calDias'>M</div></td>
<td><div class='calDias'>X</div></td>
<td><div class='calDias'>J</div></td>
<td><div class='calDias'>V</div></td>
<td><div class='calDias'>S</div></td>
</tr>
<%
End Sub

Function MonthName(MyMonth)
Select Case MyMonth
Case 1
MonthName = "Enero"
Case 2
MonthName = "Febrero"
Case 3
MonthName = "Marzo"
Case 4
MonthName = "Abril"
Case 5
MonthName = "Mayo"
Case 6
MonthName = "Junio"
Case 7
MonthName = "Julio"
Case 8
MonthName = "Agosto"
Case 9
MonthName = "Septiembre"
Case 10
MonthName = "Octubre"
Case 11
MonthName = "Noviembre"
Case 12
MonthName = "Diciembre"
Case Else
MonthName = "ERROR!"
End Select
End Function

Function LastDay(MyMonth, MyYear)
' Returns the last day of the month. Takes into account leap years
' Usage: LastDay(Month, Year)
' Example: LastDay(12,2000) or LastDay(12) or Lastday


Select Case MyMonth
Case 1, 3, 5, 7, 8, 10, 12
LastDay = 31

Case 4, 6, 9, 11
LastDay = 30

Case 2
If IsDate(MyYear & "-" & MyMonth & "-" & "29") Then LastDay = 29 Else
LastDay = 28
Case Else
LastDay = 0
End Select
End Function%>
</table>
día: <%=request("day")%>, mes: <%=request("month")%>, año:
<%=request("year")%>

Preguntas similare

Leer las respuestas

#6 Principiante
20/05/2004 - 22:13 | Informe spam
se me predio el foco y como trate de ayudar a alguien mas
te envio los códigos:
como primer linea en tus paginas asp coloca
<%@LCID34%>
para que en pantallas uses dd/mm/aaaa y aun persiste te
aconsejo que siempre recuperes la fecha por dia,mes y año
por separado para evitar confusiones. a continuación te
paso dos codigos espero te sirvan
main.asp
calenadrio.asp
son ejemplos de llamada a fecha y evitar validaciones y
errores, cuando guardo lo hago asi:
update stabla set fecha='" & sfecha & "'"


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML>
<HEAD>
<TITLE>Main Parent Window</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<%
vbvariable = request.querystring("testvariable")
vbvariable = "Hola"
%>

<SCRIPT LANGUAGE="JavaScript">
// Global variables
var winModalWindow;

function ShowWin1(xfecha) {
if (window.showModalDialog) {
rv = window.showModalDialog("calendario.asp?
xfecha="+xfecha,null,"dialogWidth00px;dialogHeight50px
;status:no");
if (rv!=undefined)
if ((datos.sfechaini.value!=rv) &&
(datos.sfechaini.length!=0))
datos.sfechaini.value = rv; // we hope for a
color here in this example.
}
}

function ShowWin2(xfecha) {
if (window.showModalDialog) {
rv = window.showModalDialog("calendario.asp?
xfecha="+xfecha,null,"dialogWidth00px;dialogHeight50px
;status:no");
if (rv!=undefined)
if ((datos.sfechafin.value!=rv) &&
(datos.sfechafin.length!=0))
datos.sfechafin.value = rv; // we hope for a
color here in this example.
}
}


function showVBcode() {
var test1 = "some string here ";
newvariable = test1 + '<%=vbvariable%>';
alert(newvariable);
}
</SCRIPT>
</HEAD>

<BODY>
<form name="datos" action="Main.asp" method="post"
target="self">
<p>ShowModal and Quasi ShowModal simple dialog
example : <BR>
<BR>
fecha de registro
<input type="text" name="sfechaini" readonly value="<%
=sfechaini%>">
<a href="javascript:ShowWin1
(datos.sfechaini.value);"><img src="icons/date.gif"
width="19" height="20" border="0"></a>
</p>
<p>otro campo
<input type="text" name="textfield" onBlur="showVBcode
();">
<p>fecha de entrega
<input type="text" name="sfechafin" readonly value="<%
=sfechafin%>">
<a href="javascript:ShowWin2
(datos.sfechafin.value);"><img src="icons/date.gif"
width="19" height="20" border="0"></a>
<p>&nbsp;
</form>
</BODY>
</HTML>



y el otro es:



<%@ Language=VBScript %>
<%
'pagina que recibirá la fecha seleccionada por el usuario
Const URLDestino = "window.history.go(-1);"

Dim MyMonth 'Month of calendar
Dim MyYear 'Year of calendar
Dim FirstDay 'First day of the month. 1 = Monday
Dim CurrentDay 'Used to print dates in calendar
Dim Col 'Calendar column
Dim Row 'Calendar row
Dim sfecha
sfecha=Request.QueryString("xfecha")
MyMonth = Request.Querystring("Month")
MyYear = Request.Querystring("Year")
' response.write "fecha anterior:" & sfecha
If Not IsDate(sfecha) Then
sfecha=date
End If
If IsEmpty(MyMonth) then MyMonth = Month(sfecha)
If IsEmpty(MyYear) then MyYear = Year(sfecha)
Call ShowHeader (MyMonth, MyYear)
FirstDay = WeekDay(DateSerial(MyYear, MyMonth, 1)) -1
CurrentDay = 1

'Let's build the calendar
For Row = 0 to 5
For Col = 0 to 6
If Row = 0 and Col < FirstDay then
response.write "<td>&nbsp;</td>"
elseif CurrentDay > LastDay(MyMonth,
MyYear) then
response.write "<td>&nbsp;</td>"
else
response.write "<td"
if cInt(MyYear) = Year(sfecha)
and cInt(MyMonth) = Month(sfecha) and CurrentDay = Day
(sfecha) then
response.write "
class='calCeldaResaltado' align='center'>"
else
response.write "
align='center'>"
end if
response.write "<button onclick='CloseModal("
& CurrentDay & "," & MyMonth & "," & MyYear & ");'>" &
CurrentDay & "</button>"
if cInt(MyYear) = Year(sfecha)
and cInt(MyMonth) = Month(sfecha) and CurrentDay = Day
(sfecha) then
Response.Write "<div
class='calResaltado'>"
else
Response.Write "<div
class='calSimbolo'>"
end if
Response.Write "</div></td>"
CurrentDay = CurrentDay + 1
End If
Next
response.write "</tr>"
Next
response.write "</table>"
response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<butto
n onclick='CloseNull();'>Ninguna</button> "
response.write "<button onclick='self.close
()'>Cerrar</button>" & "</body></html>"


' Sub and functions


Sub ShowHeader(MyMonth,MyYear)
%>
<html>
<title> * Calendario * </title>
<head>
<meta http-equiv='Content-Type'
content='text/html; charset=iso-8859-1'>
<base TARGET="_self">
<style>
.calFondoCalendario {background-
color:blue}
.calEncabe {font-family:Arial, Helvetica,
sans-serif; font-size:11px}
.calFondoEncabe {background-color:red}
.calDias {font-family:Arial Bold,
Helvetica, sans-serif; font-size:9px; font-weight:900;
color:yellow}
.calSimbolo {font-family:Arial,
Helvetica, sans-serif; font-size:11px; text-
decoration:none; font-weight:200; color:white}
.calResaltado {font-family:Arial,
Helvetica, sans-serif; font-size:11px; text-
decoration:none; font-weight:700}
.calCeldaResaltado {background-
color:white}
</style>

<script language="javascript">

function CloseModal(sdia,smes,sanio)
{
// IE type browser
if (!window.opener) {
sfecha=sdia+"/"+smes+"/"+sanio
window.returnValue = sfecha;
}
window.close();
}

function CloseNull()
{
// IE type browser
if (!window.opener) {
window.returnValue = "";
}
window.close();
}

</script>
</head>

<body bgcolor='#FFFFFF'>
<table border='1' cellspacing='3' cellpadding='3'
width='200' align='center' class='calFondoCalendario'>
<tr align='center'>
<td colspan='7'>
<table border='0' cellspacing='1'
cellpadding='1' width='100%' class="calFondoEncabe">
<tr>
<td align='left'>
<%

response.write "<a href = 'calendario.asp?"
if
MyMonth - 1 = 0 then

response.write "month&year=" & MyYear -1
else

response.write "month=" & MyMonth - 1 & "&year="
& MyYear
end if

response.write "'><span
class='calSimbolo'><<</span></a>"


response.write "<span class='calEncabe'> <b>" &
MonthName(MyMonth) & "</b> </span>"


response.write "<a href = 'calendario.asp?"
if
MyMonth + 1 = 13 then

response.write "month=1&year=" & MyYear + 1
else

response.write "month=" & MyMonth + 1 & "&year="
& MyYear
end if

response.write "'><span
class='calSimbolo'>>></span></a>"
%>
</td>
<td
align='center'>
<%

response.write "<a href = 'calendario.asp?"

response.write "month=" & Month(date) & "&year="
& Year(date)

response.write "'><div
class='calSimbolo'><b>Hoy</b></div></a>"
%>

</td>
<td align='right'>
<%

response.write "<a href = 'calendario.asp?"

response.write "month=" & MyMonth & "&year=" &
MyYear -1

response.write "'><span
class='calSimbolo'><<</span></a>"


response.write "<span class='calEncabe'> <b>" &
MyYear & "</b> </span>"

response.write "<a href = 'calendario.asp?"

response.write "month=" & MyMonth & "&year=" &
MyYear + 1

response.write "'><span
class='calSimbolo'>>></span></a>"
%>
</td>
</tr>
</table>
</td>
</tr>
<tr align='center'>
<td><div class='calDias'>D</div></td>
<td><div class='calDias'>L</div></td>
<td><div class='calDias'>M</div></td>
<td><div class='calDias'>Mi</div></td>
<td><div class='calDias'>J</div></td>
<td><div class='calDias'>V</div></td>
<td><div class='calDias'>S</div></td>
</tr>
<%
End Sub

Function MonthName(MyMonth)
Select Case MyMonth
Case 1
MonthName = "Enero"
Case 2
MonthName = "Febrero"
Case 3
MonthName = "Marzo"
Case 4
MonthName = "Abril"
Case 5
MonthName = "Mayo"
Case 6
MonthName = "Junio"
Case 7
MonthName = "Julio"
Case 8
MonthName = "Agosto"
Case 9
MonthName = "Septiembre"
Case 10
MonthName = "Octubre"
Case 11
MonthName = "Noviembre"
Case 12
MonthName = "Diciembre"
Case Else
MonthName = "ERROR!"
End Select
End Function

Function LastDay(MyMonth, MyYear)
' Returns the last day of the month. Takes into account
leap years
' Usage: LastDay(Month, Year)
' Example: LastDay(12,2000) or LastDay(12) or Lastday


Select Case MyMonth
Case 1, 3, 5, 7, 8, 10, 12
LastDay = 31

Case 4, 6, 9, 11
LastDay = 30

Case 2
If IsDate(MyYear & "-" & MyMonth
& "-" & "29") Then LastDay = 29 Else LastDay = 28

Case Else
LastDay = 0
End Select
End Function
%>
Respuesta Responder a este mensaje
#7 Carlos Rojas
21/05/2004 - 03:41 | Informe spam
no tengo access ahorita para hacer pruebas pero que tal si intentas esto
<%
Ano 04
Mes=5
Dia

sCadena="select * from latabla where fecha=#"&Ano&"/"&Mes&"/"&Dia&"#"
set rs=con.execute(sCadena)
do until rs.eof
...
'aca procesa los registros
...
rs.movenext
loop
%>
el delimitador de fecha en access es #
el formato que usaba era #yyyy/mm/dd#

Espero te sirva

Saludos
Carlos Rojas


"José M. Sánchez" escribió en el mensaje
news:
Si, si, si esas funciones ya las sé, lo que no consigo dar es con la
pregunta a la base de datos, osea, select fecha where>fecha base


formato
día+fecha base formato mes+fecha base formato año = request día+request
mes+request año

He tardado en contestaros porque estoy intentando lo que me decía Sashka,
por otra parte lo más lógico, cuando hay un nuevo registro en la base, no
solo que haya un campo Fecha, tambien uno día, otro mes y otro año.
No se me ocurre otra cosa


"fjmasero" escribió en el mensaje
news:fc0301c43e83$bcde9c40$
Existen funciones para el manejo de las fechas, como por
ejemplo, formatdatetime, q permiten bastante pruebas,
como el q de un campo como el que indicas, sacar solo la
hora, etc.

Espero q te sirva.

>Hola amigos, de vuelta estoy con el tema. Trato de hacer
un calendario en
>asp, he cogido un código de calendario muy bueno y facil
(asptutor), donde
>cada día tiene un link que te puede llevar a una asp de
resultados.
>El problema es que que los datos los tengo en Access, y
el formato de fecha
>es dd/mm/aaaa hh:mm:ss
>
>y si quiero que el link que me da un request hacia:
>calendario.asp?day'&month=5&year 04 por ejemplo.
>
>como puedo poner la conexión con la bd para que me
recoja la fecha en esos
>tres números, osea, día, mes y año?
>Yo lo he intentado así:
>
>día:<%=Day(listado.fields("Date"))
>mes:<%=Month(listado.fields("Date"))
>ano:<%=Year(listado.fields("Date"))
>consulta ="Select * from tblQuestion where
>dia='"+Request.QueryString("day")
+"'&mes='"+Request.QueryString("month")+"'&
>ano='"+Request.QueryString("year")+"' ORDER BY Date"
>
>listado.Open consulta,Conn,2,2
>If listado.BOF And listado.EOF Then %>
>No hay ninguna fecha
><% Else
>While Not listado.EOF%>
>
>
>
><%listado.MoveNext
> Wend
> end if
> listado.close%>
>
>Pero me sale error
>
>- El código de calendario.asp es muy sencillo, y si os
interesa os lo pongo
>a continuación.
>Espero vuestra respuesta pues me urge mucho para mi web
>http://www.alfeizar.net
>
>calendario.asp
>
><%@ Language=VBScript %>
><%
>'pagina que recibirá la fecha seleccionada por el usuario
>Const URLDestino = "calendario.asp"
>
>Dim MyMonth 'Month of calendar
>Dim MyYear 'Year of calendar
>Dim FirstDay 'First day of the month. 1 = Monday
>Dim CurrentDay 'Used to print dates in calendar
>Dim Col 'Calendar column
>Dim Row 'Calendar row
>
>MyMonth = Request.Querystring("Month")
>MyYear = Request.Querystring("Year")
>
>If IsEmpty(MyMonth) then MyMonth = Month(Date)
>if IsEmpty(MyYear) then MyYear = Year(Date)
>
>Call ShowHeader (MyMonth, MyYear)
>
>FirstDay = WeekDay(DateSerial(MyYear, MyMonth, 1)) -1
>CurrentDay = 1
>
>'Let's build the calendar
>For Row = 0 to 5
> For Col = 0 to 6
> If Row = 0 and Col < FirstDay then
> response.write "<td>&nbsp;</td>"
> elseif CurrentDay > LastDay(MyMonth, MyYear) then
> response.write "<td>&nbsp;</td>"
> else
> response.write "<td"
> if cInt(MyYear) = Year(Date) and cInt(MyMonth) = Month
(Date) and
>CurrentDay = Day(Date) then
> response.write " class='calCeldaResaltado'
align='center'>"
> else
> response.write " align='center'>"
> end if
> response.write "<a href='" & URLDestino & "?day=" &
CurrentDay _
> & "&month=" & MyMonth & "&year=" & MyYear & "'>"
> if cInt(MyYear) = Year(Date) and cInt(MyMonth) = Month
(Date) and
>CurrentDay = Day(Date) then
> Response.Write "<div class='calResaltado'>"
> else
> Response.Write "<div class='calSimbolo'>"
> end if
> Response.Write CurrentDay & "</div></a></td>"
> CurrentDay = CurrentDay + 1
> End If
> Next
> response.write "</tr>"
>Next
>response.write "</table></body></html>"
>
>
>' Sub and functions
>
>
>Sub ShowHeader(MyMonth,MyYear)
>%>
><html>
><head>
> <meta http-equiv='Content-Type' content='text/html;
> <style>
> .calFondoCalendario {background-color:white}
> .calEncabe {font-family:Arial, Helvetica, sans-serif;
font-size:11px}
> .calFondoEncabe {background-color:white}
> .calDias {font-family:Verdana, Helvetica, sans-serif;
font-size:9px;
>font-weight:900}
> .calSimbolo {font-family:Verdana, Helvetica, sans-
serif; font-size:11px;
>text-decoration:none; font-weight:200; color:blue}
> .calResaltado {font-family:Verdana, Helvetica, sans-
serif; font-size:11px;
>text-decoration:none; font-weight:700}
> .calCeldaResaltado {background-color:yellow}
> </style>
><title>C A L E N D A R I O</title></head>
>
><body bgcolor='#FFFFFF'>
>
><table border='1' cellspacing='3' cellpadding='3'
class="calFondoCalendario"
>style="border-collapse: collapse" bordercolor="#111111">
> <tr align='center'>
> <td colspan='7'>
> <table border='0' cellspacing='1' cellpadding='1'
width='100%'
>class="calFondoEncabe">
> <tr>
> <td align='left'>
> <%
> response.write "<a href = 'calendario.asp?"
> if MyMonth - 1 = 0 then
> response.write "month&year=" & MyYear -1
> else
> response.write "month=" & MyMonth - 1 & "&year=" &
MyYear
> end if
> response.write "'><span
class='calSimbolo'><<</span></a>"
> response.write "<span class='calEncabe'> <b>" &
MonthName(MyMonth) &
>"</b> </span>"
> response.write "<a href = 'calendario.asp?"
> if MyMonth + 1 = 13 then
> response.write "month=1&year=" & MyYear + 1
> else
> response.write "month=" & MyMonth + 1 & "&year=" &
MyYear
> end if
> response.write "'><span
class='calSimbolo'>>></span></a>"%>
> </td>
> <td align='center'>
> <%
> response.write "<a href = 'calendario.asp?"
> response.write "month=" & Month(Date()) & "&year="
& Year(Date())
> response.write "'><div
class='calSimbolo'><b>Hoy</b></div></a>"
> %>
> </td>
> <td align='right'>
> <%
> response.write "<a href = 'calendario.asp?"
> response.write "month=" & MyMonth & "&year=" &
MyYear -1
> response.write "'><span
class='calSimbolo'><<</span></a>"
>
> response.write "<span class='calEncabe'> <b>" &
MyYear & "</b>
></span>"
> response.write "<a href = 'calendario.asp?"
> response.write "month=" & MyMonth & "&year=" &
MyYear + 1
> response.write "'><span
class='calSimbolo'>>></span></a>"
> %>
> </td>
> </tr>
> </table>
> </td>
> <td rowspan="8">
> sssssss kjdakjda kjjkj kjj kjkjkkj<p>opooipda
poioppi</p>
> <p>opàdàdpo oo`p</p>
> <p>`da`da`poad`poda`poda</td>
> </tr>
> <tr align='center'>
> <td><div class='calDias'>D</div></td>
> <td><div class='calDias'>L</div></td>
> <td><div class='calDias'>M</div></td>
> <td><div class='calDias'>X</div></td>
> <td><div class='calDias'>J</div></td>
> <td><div class='calDias'>V</div></td>
> <td><div class='calDias'>S</div></td>
> </tr>
><%
>End Sub
>
>Function MonthName(MyMonth)
> Select Case MyMonth
> Case 1
> MonthName = "Enero"
> Case 2
> MonthName = "Febrero"
> Case 3
> MonthName = "Marzo"
> Case 4
> MonthName = "Abril"
> Case 5
> MonthName = "Mayo"
> Case 6
> MonthName = "Junio"
> Case 7
> MonthName = "Julio"
> Case 8
> MonthName = "Agosto"
> Case 9
> MonthName = "Septiembre"
> Case 10
> MonthName = "Octubre"
> Case 11
> MonthName = "Noviembre"
> Case 12
> MonthName = "Diciembre"
> Case Else
> MonthName = "ERROR!"
> End Select
>End Function
>
>Function LastDay(MyMonth, MyYear)
>' Returns the last day of the month. Takes into account
leap years
>' Usage: LastDay(Month, Year)
>' Example: LastDay(12,2000) or LastDay(12) or Lastday
>
>
> Select Case MyMonth
> Case 1, 3, 5, 7, 8, 10, 12
> LastDay = 31
>
> Case 4, 6, 9, 11
> LastDay = 30
>
> Case 2
> If IsDate(MyYear & "-" & MyMonth & "-" & "29") Then
LastDay = 29 Else
>LastDay = 28
> Case Else
> LastDay = 0
> End Select
>End Function%>
></table>
>día: <%=request("day")%>, mes: <%=request("month")%>,
año:
><%=request("year")%>
>
>
>.
>


email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una pregunta AnteriorRespuesta Tengo una respuesta
Search Busqueda sugerida