Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/02/2010, 04:19
Avatar de Cameron_2006
Cameron_2006
 
Fecha de Ingreso: diciembre-2006
Mensajes: 248
Antigüedad: 17 años, 4 meses
Puntos: 0
Respuesta: formato de fecha BD MySQL

Listo, gracias o tra vez Shiryu_Libra, ya funciona y de esta manera que copio tal cual por si alguien se le presenta el mismo problema:

function formatoFecha(fecha)
dia=Right("00" & day(cdate(fecha)), 2)
mes=Right("00" & month(cdate(fecha)), 2)
anio=year(cdate(fecha))

formatoFecha=anio & "-" & mes & "-" & dia
end function

if fecha_inicio<>"" then
fecha_inicio=formatoFecha(fecha_inicio)
end if
if fecha_final<>"" then
fecha_final=formatoFecha(fecha_final)
end if
IF fecha_final < fecha_inicio THEN
response.redirect("validafecha.asp")
END IF