Just use the DATEADD(NOW(),-7) and DATEADD(NOW(),+7) set those as variables
(or use your date your passing to do the + and - then in your query do Where
tday < '#DateFormat(Startdate,  'DD')#' and tday > '#DateFormat(Enddate,
'DD')#' order by tDay
-----Original Message-----
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 10:35 AM
To: CF-Talk
Subject: Re: [last 7 days]


AND tday > DBDateFuntiont(day - 7days)

Peter Benoit <[EMAIL PROTECTED]> wrote:
Trying to post some results to a CF report that I built, but I can't think
of a way to poll the database for any records on the last 7 days to present
in the report.

so far I have:

<cfquery name="dayData" datasource="#DSN#">
   SELECT *
   FROM outageReport
   WHERE tMonth LIKE '#url.month#'
   AND tDay LIKE <!-- ok, this is the part I can't figure out... I need to
get the last 7 days including today here... -->
</cfquery>

I just save the day/month/year info in different columns in the database, so
tDay would look like 27 for today, tMonth 3, tYear 2001.

thanks for any help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to