You should be able to do a simple group on the date:

SELECT
  Format(YourDate,'mmmm') AS GroupedDate
GROUP BY
  GroupedDate

http://cfhub.com/forum//index.cfm?FuseAction=Thread&TopicID=2399


> Hi,
>
> What is the best way to group by months for a query that contains full
(day,
> month, year) dates?
>
> The query looks something like:
>
> startDate , user
> 10-JUN-2000, Bill
> 30-JUN-2000, Steve
> 15-SEP-2000, Phil
>
> I would like the results to be displayed thus:
>
> June 2000
>
>   Bill
>   Steve
>
> September 2000
>
>   Phil
>
> Since the month would not be in a query column by itself I could not use
it
> as cfoutput's group column.
>
> Ideally I would like some simple mechanism like:
>
> <cfoutput query="qryExampleDates" group="Month(startDate)">
>
> I'm currently using CF5.
>
> I am thinking of manipulating the query recordset (in CF) to add a new
> column that just contains the month part of the date.
>
> cheers
>
> David
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to