[thelist] CF & SQL: Selecting unique months from date column

Minh Lee Goon evolt at goonies.info
Thu Jul 17 15:33:54 CDT 2003

Thank you so much for the input. I didn't realize that SQL had a Month()
function. That will come in handy.

Now that I've implemented that, I wonder if I could extend my question. I'd
like to also get the year with each date instead of just the number of the
month. In short, I'd like to select one record for each month. Is there a
simple way of doing that?

Not the film. The family.

----- Original Message ----- 
From: "Tab Alleman" <Tab.Alleman at MetroGuide.com>

SELECT Month(DateColumn)
FROM TableName
GROUP BY Month(DateColumn)

More information about the thelist mailing list