Comments - SELECT statement not returning values with BETWEEN clause containing dates

3 years, 10 months ago Jan Steinman

CURRENT_DATE() returns an INTeger.

Try using ADDDATE(CURRENT_DATE, -x).

Or CONVERT(CURRENT_DATE() -x, DATE)

 
3 years, 10 months ago Marc Fortin

The ADDDATE() trick made it so that the results are more reliable on the complete range expected.

Thank you for you input.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.