Forum Moderators: open
Here is my query:
SELECT distinct posted FROM news WHERE category LIKE 'Tech' ORDER by posted DESC
The 'posted' field is the date the story was created and is a varchar(10).
The format of the date that I insert is 12-03-2005. So I know why my query gets confused with 01-15-2006.
I tried to change the field type to DATE but then all the dates become 0000-00-00 since MySQL wants the date to be YYYY-MM-DD and my format is MM-DD-YYYY.
Is there a simple way to fix the display order by a different SELECT statement?
Otherwise I guess I can export all the data,change it in Excel and import it back in YYYY-MM-DD format and of course change the PHP script that writes to the DB.