date functions in GROUP BY?

2001-02-19 Thread stirra
I have a table with a date field, and would like to sort it on month and day. What I would like to do is: SELECT lastname,firstname,dob FROM table1 GROUP BY month(dob),day(dob) (where dob is a column of type 'date') but that doesn't work. I'm using MySQL 3.22.32. I saw one post about

Re: date functions in GROUP BY?

2001-02-19 Thread Fred van Engen
On Mon, Feb 19, 2001 at 11:06:21AM -0800, [EMAIL PROTECTED] wrote: I have a table with a date field, and would like to sort it on month and day. What I would like to do is: SELECT lastname,firstname,dob FROM table1 GROUP BY month(dob),day(dob) (where dob is a column of type 'date')