I am having issues with a MySql query
It will not show any dates in the future is the day is less then the current day.
For example it will show the entry with a date of 2010-05-20
But not 2010-05-10 Even though the date is in the future.
The date format within MySql is datestamp. 0000-00-00 00:00:00 and called startdate.
Any ideas?
Code:
SELECT *,DATE_FORMAT(startdate, '%d-%m-%Y')AS startdate, startdate as sortdate from {$table} WHERE DATE_FORMAT(startdate, '%d-%m-%Y') >= DATE_FORMAT(now(), '%d-%m-%Y') ORDER BY sortdate ASC
For example it will show the entry with a date of 2010-05-20
But not 2010-05-10 Even though the date is in the future.
The date format within MySql is datestamp. 0000-00-00 00:00:00 and called startdate.
Any ideas?
Comment