Ver Mensaje Individual
  #3  
Antiguo 28-06-2005
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Por ejemplo

Código SQL [-]
Select fecha,nombre,edad from mitabla
where fecha between :fecha_inicial and :fecha_final

Antes de abrir la consulta sustituyes los parámetros con


Código Delphi [-]
Query1.ParamByName('fecha_inicial').AsDate := fechaInicial;
Query1.ParamByName('fecha_final').AsDate := fechaFinal;

donde fechaInicial y fechaFinal serían dos variables de tipo TDate con los valores adecuados.

// Saludos
Responder Con Cita