I have a simple query in a Datetime
field, I have to query two dates, of course retrieving the values between them.
select
financ_conta_id,
financ_conta_cadastro
from
financ_conta
where
financ_conta_cadastro between CURRENT_DATE()-3 and CURRENT_DATE()
If I keep this way, the data are not displayed today, they only show yesterday's values for less than 3 days, that is, my accounts registered on 7/21 are not displayed, and today it is 7/21.
The result is returning as if it had done this:
financ_conta_cadastro between CURRENT_DATE()-3 and '2016-07-22'
What's wrong?