Ver Mensaje Individual
  #1  
Antiguo 23-05-2003
judoboy judoboy is offline
Miembro
 
Registrado: may 2003
Ubicación: Valencia
Posts: 139
Reputación: 24
judoboy Va por buen camino
¿Realizar una busqueda de fechas?

Hola me gustaría saber como realizar una búsqueda acotandola entre dos fechas, Utilizo Access en esta apliación
introduzco los datos así añadido a mi SentenciaSql
Código:
{información sobre la fecha de los Alquileres}
     try
        begin    {FECHA ALQUILER}
             if (FechaInicio.Text<>'  /  /    ') then
                SentenciaSql:=SentenciaSql+' AND
 CP.FECHAINICIO>='''+FormatDateTime

                 ('dd/mm/yyyy',StrToDateTime(FechaInicio.Text))+'''';
             if (FechaFin.Text<>'  /  /    ') then
                SentenciaSql:=SentenciaSql+' AND
 CP.FECHAINICIO<='''+FormatDateTime
                 ('dd/mm/yyyy',StrToDateTime(FechaFin.Text))+'''';
        end;
      except
            on EConvertError do
               begin
                   Application.MessageBox('Error al introducir la
 fecha','ERROR',Mb_Ok+Mb_IconInformation);
                   FrmBuscarAlquiler.ModalResult:=0;
                   Exit;
               end;
      end;
pero no me realiza la busqueda bien
Responder Con Cita