Tema: Fechas Nulas
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/04/2011, 16:38
Avatar de focesar
focesar
 
Fecha de Ingreso: abril-2005
Mensajes: 84
Antigüedad: 19 años
Puntos: 0
Busqueda Fechas Nulas

Buenas Tardes

Estoy migrando una aplicacion ASP-Access a ASP-SQL Server 2000 que hice hace ya bastante tiempo.

Tengo una pagina que me envia este error cada vez que lo ejecuto, pero solo me lanza el error cuando uno de los campos de fecha, ya se fech_asig o fech_cierr esta nulo

El error que me lanza es este.

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FormatDateTime'
/prueba/html/cerradas.asp, l�nea 98

El codigo del sitio es este.
Código:
<table border="0" >

<tr>
<td align="center" width="75">Venta</td>
<td align="center" width="75">Teléfono</td>
<td align="center" width="75">Técnico</td>
<td align="center" width="125">Asignación</td>
<td align="center" width="125">Ejecución.</td>
<td align="center" width="125">Cierre SIMO</td>
<td align="center" width="100">Estado</td>
<td align="center" width="100">Mov</td>
<td width="350" class="style1">Observaciones / Equipo Terminal</td>
</tr>

<%do while not rs.eof%>

<tr>
<td align="center" width="75"><b><font size="2"><%if rs("venta_tec")=true then response.write "Técnico" else response.write "-" end if%></font></b></td>
<td align="center" width="75"><b><font size="2"><%=rs("num_tel")%></font></b></td>
<td align="center" width="75"><b><font size="2"><%=rs("cod_tec")%></font></b></td>
<td align="center" width="125"><b><font size="2"><%=FormatDateTime(rs("fech_asig"),2)& " " & FormatDateTime(rs("fech_asig"),4)%></font></b></td>
<td align="center" width="125"><b><font size="2"><%=FormatDateTime(rs("fech_ejec"),2)& " " & FormatDateTime(rs("fech_ejec"),4)%></font></b></td>
<td align="center" width="125"><b><font size="2"><%=FormatDateTime(rs("fech_cier"),2)& " " & FormatDateTime(rs("fech_cier"),4)%></font></b></td>
<td align="center" width="100"><b><font size="2"><%if rs("tip_ejec")="0" then
response.write("PENDIENTE")
elseif rs("tip_ejec")="1" then
response.write("EJECUTADA")
elseif rs("tip_ejec")="2" then
response.write("DEMANDA PEND")
elseif rs("tip_ejec")="3" then
response.write("ANULADA")
end if%></font></b></td>
<td align="center" width="100"><b><font size="2"><%=rs("cod_mov")%></font></b></td>
<td width="350" class="style1"><b><font size="2"><%=rs("equip_term")%></font></b></td>
</tr>

<%rs.movenext%>
<%loop%>
<%rs.close%>
</table>
La linea de codigo en rojo es la 98 que cita el error.

Les agradeceria si alguno me puede ayuda, por que llevo varias horas de darle al coco y se esta fundiendo.
__________________
El valor el hombre no es proporcional a las veces que ha triunfado, sino a las veces que se a levantado de los errores

:pensando: