Fórum Comando Between usando Delphi e Access #167682
03/07/2003
0
Quando dou o comando between (Data between :inicio and :fim), ele me retorna os registros desde a data inicial, deixando fora a data final. O estranho é que quando utilizo o mesmo comando no Interbase, este funciona.
Exemplo: inicio: 01/07/2003 fim: 31/07/2003.
Ele me retorna todos os registros entre essas datas, exceto os registros existentes em 31/07/2003.
O que há de errado ??
Gfcosta
Curtir tópico
+ 0Posts
04/07/2003
Maurício Santos
No Access alguns comando SQL são diferentes.
Tente esta linha de comando:
SELECT * FROM Tabela WHERE (((Tabela.CampoData) Between [Data inicial] And [Data final]));
Espero ter ajudado
[]´s
Gostei + 0
04/07/2003
Maurício Santos
No Access alguns comando SQL são diferentes.
Tente esta linha de comando:
SELECT * FROM Tabela WHERE (((Tabela.CampoData) Between [Data inicial] And [Data final]));
Espero ter ajudado
[]´s
Gostei + 0
04/07/2003
Erucci
Use o:
[b:7b1eff7332]FormatDateTime(´yyyy/mm/dd´,StrToDate(data));[/b:7b1eff7332]
Exemplo:
Adoquery1.close;
Adoquery1.Parameters[0].Value:=FormatDateTime (´yyyy/mm/dd´,StrToDate(maskedit1.text));
Adoquery1.Parameters[1].Value:=FormatDateTime(´yyyy/mm/dd´,StrToDate(maskedit2.text));
Adoquery1.open;
[]´s
luís erucci
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)