Hi,
I'm trying to compare two dates - today's date and a date in the database - to see if the database date is 6 months ago or not.
Here is a snippet of the query:
Select curdate(), DATE_SUB(CURDATE(), INTERVAL 6 MONTH), ...
I've noticed that CURDATE() is returning '2005-02-02 00:00:00' on mysql running locally on my laptop.
Does anyone know why this is returning the date in YYYY-MM-DD HH:MM:SS instead of just YYYY-MM-DD?? It's driving me nuts because I can't make a proper comparision since the value in the database is YYYY-MM-DD.
This problem just seemed to arise today as I've had this query run before and work fine.
Thanks.
Rob
P.S.
If anyone needs to know, I'm running v.3.23.22-beta of MySQL.