jumping in this thread late, so i may not know all of the particulars (but
being ignorant has never stopped me from opening my mouth before...)

if you want to group by months...

<cfquery name="foo" datasource="bar">
    SELECT
        month(myDateColumn) as groupMonth,
        myDateColumn,
        column1,
        column2
    FROM
        myTable
    ORDER BY
        myDateColumn
</cfquery>

<cfoutput query="foo" group="groupMonth">
    #monthAsString(groupMonth)#<br />

    <cfoutput>
        #myDateColumn#<br />
    </cfoutput>
    <br />
</cfoutput>

something like that should work.

----- Original Message -----
From: "Robert Orlini" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, April 16, 2004 8:23 AM
Subject: RE: Query date

> Sorry. I'm new to this.
>
> I need to group dates of this format for example: 04/15/2004, 4/21/2004,
4/30/2004 on a seperate page. A dropdown would enable users to drill thru
what months they need.
>
> -----Original Message-----
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 16, 2004 11:20 AM
> To: CF-Talk
> Subject: RE: Query date
>
>
> Robert Orlini said:
> >
> > I need to compare date ranges of this format: 00/00/0000.
>
> Which format is that? dd/mm/yyyy or mm/dd/yyyy?
>
> > If the dates in my column are lets say 04/15/2004, 04/20/2004, then
> > these dates are to be listed in another page.
> >
> > How can I use the Where statement to group dates in this format?  Or
> > is there a better way in the Select?
>
> Grouping is done using GROUP BY, not using WHERE. I'm afraid I am
> going to need a less cryptic question to be more specific.
>
> Jochem
>
> --
> I don't get it
> immigrants don't work
> and steal our jobs
>      - Loesje
>   _____
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to