Delphi - Filtro con DateTimePicker???

 
Vista:

Filtro con DateTimePicker???

Publicado por Alejandro (4 intervenciones) el 09/12/2008 20:18:47
Hola, estoy haciendo un reporte con un Grid y cuando ejecuto la sentencia SQL del ADOQuery me trae cualquier fecha.
En el campo Fecha (Firebird 1.5) tengo el formato String 01/01/2008 y en el Format del DateTimePicker igual. Si filtro desde 01/12/2008 al 31/12/2008 me trae año 2006, lo del rango de fechan de Diciembre no, cualquier cosa !!!, alguien me puede decir cual es el problema?

Gracias !!!

tx:='Select * from auditoria where fecha Between #';
tx:=tx + DateToStr(desde) + '# And #' + DateToStr(hasta) + '#';

qr.Close;
qr.SQL.Clear;
qr.SQL.Add(tx);
qr.Open;
try
qr.ExecSQL;
except
end;
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder