Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/06/2007, 07:04
Avatar de messer
messer
 
Fecha de Ingreso: julio-2004
Mensajes: 467
Antigüedad: 20 años, 9 meses
Puntos: 5
Re: Problema con Datediff

Me sigue dando problemas ahora tambien con fechas posteriores a la fecha actual, 01/08/2007 y 10/08/2007 me da 273 noches.

Aqui el codigo completo:
<%
ing=Request.Form("in")
sal=Request.Form("out")
if ing = "" or sal = "" then
%>
<form name="form1" method="post" action="fechas.asp">
<table width="317" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="121">Entrada</td>
<td width="188"><input type="text" name="in" id="in"></td>
</tr>
<tr>
<td>Salida</td>
<td><input type="text" name="out" id="out"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="button" id="button" value="Enviar"></td>
</tr>
</table>
</form>
<%
else
fecha=datediff("d",ing,sal)
Response.Write("<h2>Cantidad de noches: "&fecha&"</h2>")
end if
%>
y este el link para que lo prueben: Pinchar Aqui

Sera que tenga algo que ver el servidor, o que..? NO SE QUE PASA..

El codigo es correcto..
__________________
<script type="text/messerScript"><!--
window.onload=function(){ loadMesserRules(this.href) }
--></script>

Última edición por messer; 21/06/2007 a las 07:24 Razón: Edito el post para agregar el codigo y habilitar el vinculo de prueba