Question

I want to show all data which is not updated in 13 days in MYSQL.I tried a lot but i got issue with that..

here is what i tried

"SELECT * FROM TABLE WHERE datediff( curdate( ) , dateupdated )>13

I also tried this

SELECT * FROM crm_rentals where dateupdated  BETWEEN NOW() AND dateupdated(NOW(), INTERVAL 15 DAY)

I have to do something with:

curdate()= dateupdated  +13 days

OR

dateupdated  = curdate()-13days

What is missing here?

Was it helpful?

Solution

have you tried this?

SELECT * FROM tableName WHERE dateUpdated < CURDATE() - INTERVAL 13 DAY
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top