How do you make a query where you ORDER BY birthday disregarding the year altogether. I need to eliminate/disregard the year and ORDER BY birthdate month and birthdate day from today’s date in either ASC or DESC.
The below won’t work because the years of the birthdate come into play. The below example shows what happens when the year is regarded:
John 01/02/1974
Billy 11/15/2000
Ally 06/25/2008
SELECT * FROM users ORDER BY birthdate
Expected results when ordering by birthday:
John 01/02/1974
Ally 06/25/2008
Billy 11/15/2000
This will normalize all dates to the year 2000:
This will handle leap year babies correctly.