oldrock
oldrock

Reputation: 871

Mysql Ordering by date

I have a date field in my table called date1. if i use the following query.

 select * from schedule order by date1 asc

 it gives the result like as jan 2011 comes before december 2010. but i need the december 2011 as the first row of the result. 

Upvotes: 0

Views: 54

Answers (2)

Naveed
Naveed

Reputation: 42093

select * from schedule order by date1 desc

Upvotes: 0

Bojangles
Bojangles

Reputation: 101493

Change your query to

SELECT * FROM schedule ORDER BY date1 DESC

This should do the trick.

James

Upvotes: 1

Related Questions