Como fazer um WHERE com datetimepicker?
Preciso fazer um where nesse mesmoestilo do meu codigo porém usando um DATETIMEPICKER como eu faço ?
Desde já agradeço !
Desde já agradeço !
if rbconcluidofiltrotarefa.ItemIndex=0 then begin
wconcluido:= ' CONCLUIDO = "S"'
end
else if rbconcluidofiltrotarefa.ItemIndex=1 then begin
wconcluido:= ' CONCLUIDO = "N"'
end;
if eDescricaofiltrotarefa.text<>'' then begin
wdescricao := ' DESCRICAO LIKE '+#39+eDescricaofiltrotarefa.Text+'%'+#39'';
end;
if dblusuariofiltrotarefa.text<>'' then begin
wusuario := 'NOMOPEOP LIKE '+#39+dblusuariofiltrotarefa.text+'%'+#39'';
end;
if dblcategoriafiltrotarefa.text<>'' then begin
wcategoria := ' CATEGORIA LIKE '+#39+dblcategoriafiltrotarefa.Text+'%'+#39'';
end;
if dblclientefiltrotarefa.text<>'' then begin
wcliente := ' NOMCLICL LIKE '+#39+dblclientefiltrotarefa.Text+'%'+#39'';
end;
{if datetimepicker1.Date <>'' then begin
wdata := ' DATA_CONCLUSAO LIKE '+#39+datetimepicker1.date+'%'+#39'';
end; }
wwhere := ' WHERE '+wconcluido;
if wdescricao<>'' then
wwhere := wwhere+' AND '+wdescricao;
if wusuario<>'' then
wwhere := wwhere+' AND '+wusuario;
if wcategoria<>'' then
wwhere := wwhere+' AND '+wcategoria;
if wcliente<>'' then
wwhere := wwhere+' AND '+wcliente;
DM.qTarefaLead.Close;
DM.qTarefaLead.sql.text :='SELECT * FROM GTELTAREFA'+
' LEFT OUTER JOIN GTELCLI ON (GTELCLI.CODCLICL = GTELTAREFA.COD_CLIENTE) LEFT OUTER JOIN GTELOPE ON (GTELOPE.CODOPEOP=GTELTAREFA.USUARIO_ABERTURA)'+
wwhere;
DM.qTarefaLead.Open;
except
showmessage('Preenchimento Invalido.');
end;
Rodrigo Oliveira
Curtidas 0