Hi Friends,
I have a table with field
Id--vDate
-------------
1--3/1/2007 12:00:00 AM
2--4/1/2007 12:00:00 AM
3--4/12/2007 5:28:15 PM
4--3/1/2005 12:00:00 AM
SELECT DATE_FORMAT(vDa te,'%b-%Y-%m'),ID FROM TEST ORDER BY DATE_FORMAT(vDa te,'%b-%Y-%m') DESC;
The query above doesn't give me the correct answer.
Can anyone tell me can i get the ascending order on the based date field when iam formating that field using DATE_FORMAT(vDa te,'%b-%Y-%m').
Thanks,
Scarlet
I have a table with field
Id--vDate
-------------
1--3/1/2007 12:00:00 AM
2--4/1/2007 12:00:00 AM
3--4/12/2007 5:28:15 PM
4--3/1/2005 12:00:00 AM
SELECT DATE_FORMAT(vDa te,'%b-%Y-%m'),ID FROM TEST ORDER BY DATE_FORMAT(vDa te,'%b-%Y-%m') DESC;
The query above doesn't give me the correct answer.
Can anyone tell me can i get the ascending order on the based date field when iam formating that field using DATE_FORMAT(vDa te,'%b-%Y-%m').
Thanks,
Scarlet
Comment