I've a question. I want to display all records where "createdat"(column name) is older than 2 weeks.
Normally this is an easy one. The unfortunate problem is, all my records are inserted into the database with the time/date format as followed: 01-01-2020
instead of 2020/01/01
.
I was fiddling around with this one for quite a while. Can you guys please help me?
SELECT DATE_FORMAT(createdat, '%d-%m-%Y'), status
FROM facturen
WHERE status='Niet voldaan' AND createdat > DATE_ADD(NOW(), INTERVAL - 14 DAY)