I'm a little bit confused. You have two dates stored in a mysql database in a field with data type "date".
These dates - 7th Sept. and 10th Oct. - are stored with format "YYYY-MM-DD" (Year-Month-Day)
"2002-09-07"
"2002-10-10"
Now you are selecting these dates using the format strings:
%e Day of the month, numeric (0..31), 1 or 2 digits
%c Month, numeric (1..12), 1 or 2 digits
%y Year, numeric, 2 digits
7th Sept. -> '%e/%c/%y' -> "9/7/02"
10th Oct. -> '%e/%c/%y' -> "10/10/02"
You are sorting them by date_completed ascending (and not by the formatted character string).
I can't believe that the result shows
"10/10/02" in front of
"9/7/02"
(this is descending order)
Why you're example shows "09/07/02" instead of "9/7/02". Does your samples show day/month/year or month/day/year format?
Or would you like to sort the formatted Date like ... date_format(date_completed, '%e/%c/%y') as FORM_DATE ORDER by FORM_DATE ...
?