Also, what happens when I try to run this method in January, and it attempts to
subract "1" from the month number?
> Charlie,
>
> The problem I see off the bat is when I get to future years, it will
> retrieve records from all years, as long as the MONTH matches.
>
> No matter, though. I am on the right track and will modify your
> suggestion accordingly.
>
> Thanks!
>
>
>
>
> >there's probably a pure SQL way to do it too, but since I'm better
> >with CF than SQL, my hybrid solution would be:
> >
> ><cfset lastMonth = month(dateAdd('m', -1, now())) />
> >
> ><cfquery name="myQuery" datasource="myDSN">
> > SELECT
> > columns
> > FROM
> > tablename
> > WHERE
> > month(myDateColumn) = #lastMonth#
> ></cfquery>
> >
> >standard disclaimer about being untested, could cause warts, etc.
> >
> >
> >On 9/21/05, Claremont, Timothy <[EMAIL PROTECTED]>
> wrote:
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218839
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54