1
I know that if I want to query the date 5 days ago, I use the following Query:
SELECT * FROM Tabela WHERE Data = DATE_SUB(CONCAT(CURDATE(), ' 00:00:00'), INTERVAL 5 DAY);
Or you want to go back two months ago I replace the DAY
for MONTH
:
SELECT * FROM Tabela WHERE Data = DATE_SUB(CONCAT(CURDATE(), ' 00:00:00'), INTERVAL 2 MONTH);
However, how do I go back 2 months and 5 days?
That’s right, thank you very much
– Geraldão de Rívia