Jump to content
Fórum Script Brasil
  • 0

Pesquisa Por data Delphi


Aj Trader 01

Question

Tenho uma tabela com a data de validade de uma taxa

Validade Taxa
01/10/2021 1,50
02/10/2021 1,45
03/10/2021 1,52
06/10/2021 1,39
07/10/2021 1,88
08/10/2021 1,89

Preciso encontrar a taxa para a data 05/10/2021 se não encontrar preciso da data menor ou igual, mas não consigo seguir adiante com o código.

Código

Procedure Tfrmteste.Button1Click(Sender: TObject);
var
datanf:Tdatetime;
begin
datanf:=strtodate(edit1.text);
dm.QryTaxasb3.Active;
dm.QryTaxasb3.sql.clear;
dm.QryTaxasb3.sql.add('Select * From Taxasb3 where Datainicio<='+QuotedStr(FormatDateTime('DD.MM.YYYY',datanf)));
dm.QryTaxasb3.open;

end;

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      651.8k
×
×
  • Create New...