1
I searched but did not understand how to use the function DATEDIFF() in the FIREBIRD what I need is for the query to return me records with dates up to 10 previous days from the date current.
Obs: Understand current date by the day the query is made.
I’ll put an example that would work on mysql where I have better dominance, but what I need is an example of how I would look in FIREBIRD.
select
pag_id as ID,
pag_data_emissao as EMISSAO,
pag_valor AS VALOR,
pag_historico AS HISTORICO,
pag_saldo AS SALDO,
pag_debito_credito as deb_cred
from tab_banco_lanc where pag_data_emissao >= DATE_SUB(curdate(),INTERVAL 10 DAY)
Thank you, I was able to test with your answer, I just had to change the parameters and name of the table, but it worked right !
– SneepS NinjA
Oh yes.. I forgot to change the example according to your table!
– Celso Marigo Jr
I’m having a similar problem http://answall.com/questions/120596/comort-fazer-um-sql-que-consulte-apenas-dia-de-umdata
– Gladison Neuza Perosini