List:General Discussion« Previous MessageNext Message »
From:Fred Lindberg Date:April 26 1999 10:52pm
Subject:Re: Order by date
View as plain text  
On Mon, 26 Apr 1999 23:50:47 +0100, Peter Hicks wrote:

>   SELECT * FROM members WHERE date_of_birth != '0000-00-
>00' ORDER BY date_of_birth;

Create a separate column with dayofyear(date_of_birth). Make it indexed
and ORDER BY it.

DAYOFYEAR(date): Returns the day of the year for date, in the range 1
to 366.


-Sincerely, Fred

(Frederik Lindberg, Infectious Diseases, WashU, St. Louis, MO, USA)


Thread
Order by datePeter Hicks27 Apr
  • Re: Order by dateChristian Mack27 Apr
Re: Order by dateFred Lindberg27 Apr