Fórum Selecionar Registros por MÊS #197012
25/11/2003
0
Desde já agradeço.
N_valdo
Curtir tópico
+ 0Posts
25/11/2003
Marcelo.c
Select nome, extract(month from campodata)||´/´||extract(year from campodata) as mesano where mesano=:data;
Gostei + 0
25/11/2003
Wallacest
procure o Help do delphi sobre ENCODE E DECODE DATE
Gostei + 0
25/11/2003
Luineumann
você deverá simular este compoente num maskedit, com máscara por exemplo !99/9999;1;_
no onexit da tabela vc faz, por exemplo
procedure TForm1.MaskEdit1Exit(Sender: TObject);
var
mm, aa : word;
begin
mm := strtoint(copy(maskedit1.Text, 1, 2));
if (mm < 1) or (mm > 12)
then begin
showmessage(´erro´);
exit;
end;
aa := strtoint(copy(maskedit1.Text, 4, 4));
table1.filter := ´(DataEntrada >= ´
+ quotedstr(formatdatetime(´dd/mm/yyyy´, encodedate(aa, mm, 1)))
+ ´)´;
// quotedstr é uma fc que devolve o argumento entre aspas simples
mm := mm + 1;
if mm = 13
then begin
mm := 1;
aa := aa + 1;
end;
table1.filter := table1.filter
+ ´and (DataEntrada <= ´
+ quotedstr(formatdatetime(´dd/mm/yyyy´, encodedate(aa, mm, 1) - 1))
+ ´)´;
table1.filtered := true;
Gostei + 0
25/11/2003
Luizfernando777
Select * from cliente
where extract( month from nasc )= 1 and
extract( year from nasc ) = 1974
order by nome
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)