Cita:
funcion FechaGenerica:fechainicio = FechaGenerica(Date()-1)
fechafin = FechaGenerica(Date()-6)
Set Registros = Server.CreateObject ("ADODB.RecordSet")
Registros = Conexion.execute ("SELECT COUNT(*) AS con FROM TEMP_RECLAMOS WHERE REC_F_INGRE_SISTEMA Between #"&fechainicio&"# and #"&fechafin&"# and REC_INSISTENCIA = 'Con Insistencia' ")
fechafin = FechaGenerica(Date()-6)
Set Registros = Server.CreateObject ("ADODB.RecordSet")
Registros = Conexion.execute ("SELECT COUNT(*) AS con FROM TEMP_RECLAMOS WHERE REC_F_INGRE_SISTEMA Between #"&fechainicio&"# and #"&fechafin&"# and REC_INSISTENCIA = 'Con Insistencia' ")
Cita:
me muestra valores incorrectos y estuve rpobando y al parecer es el problema con las fechas, puesto que esta consulta me funciona bien: Function FechaGenerica(fecha)
If IsDate(fecha) = True Then
DIM dteDay, dteMonth, dteYear
dia = Day(fecha)
mes = Month(fecha)
ano = Year(fecha)
FechaGenerica = Right(Cstr(mes + 100),2)& "-" & Right(Cstr(dia + 100),2) & "-" & ano
Else
FechaGenerica = Null
End If
End Function
If IsDate(fecha) = True Then
DIM dteDay, dteMonth, dteYear
dia = Day(fecha)
mes = Month(fecha)
ano = Year(fecha)
FechaGenerica = Right(Cstr(mes + 100),2)& "-" & Right(Cstr(dia + 100),2) & "-" & ano
Else
FechaGenerica = Null
End If
End Function
Cita:
de antemanos gradcias por la ayuda Set Registros = Server.CreateObject ("ADODB.RecordSet")
Registros = Conexion.execute ("SELECT COUNT(*) AS con FROM TEMP_RECLAMOS WHERE REC_INSISTENCIA = 'Con Insistencia' ")
Registros = Conexion.execute ("SELECT COUNT(*) AS con FROM TEMP_RECLAMOS WHERE REC_INSISTENCIA = 'Con Insistencia' ")