so it would really look like...
<CFQUERY NAME="whatsnew" DATASOURCE="puhweb">
select * FROM whats_new
WHERE dateAdded >=
'#dateFormat(dateAdd('d',-7,now()),'mm/dd/yyyy')#'
order by dateAdded DESC
</CFQUERY>
....tony
r e v o l u t i o n w e b d e s i g n
[EMAIL PROTECTED]
www.revolutionwebdesign.com
its only looks good to those who can see bad as well
-anonymous
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 12:35 PM
To: CF-Talk
Subject: RE: 7 days old
hey dan.
here is what ya want.
<CFQUERY NAME="whatsnew" DATASOURCE="puhweb">
select * FROM whats_new
WHERE dateAdded >= dateFormat(dateAdd('d',-7,now()),'mm/dd/yyyy')
order by dateAdded DESC
</CFQUERY>
hth
....tony
r e v o l u t i o n w e b d e s i g n
[EMAIL PROTECTED]
www.revolutionwebdesign.com
its only looks good to those who can see bad as well
-anonymous
-----Original Message-----
From: Daniel Kessler [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 12:31 PM
To: CF-Talk
Subject: 7 days old
I'm doing a query for all records that are newer than 7 days. I
inserted the date using DateFormat(Now()). Unfortunately it gives me
an error that dateAdded is unidentified. True, it's a column and I
want it to search the column for anything less than 7 days old. Can
anyone help me word this WHERE?
<CFQUERY NAME="whatsnew" DATASOURCE="puhweb">
select * FROM whats_new
WHERE '#DateDiff("d",dateAdded,the_date)#' < 7
order by dateAdded DESC
</CFQUERY>
thanks.
--
Daniel Kessler
Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD 20742-2611
301-405-2545 Phone
www.phi.umd.edu
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]