yeah, more than was needed...ur right, my bad.

....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: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 12:50 PM
To: CF-Talk
Subject: Re: 7 days old

assuming (yeah, yeah, i know) that dateAdded is a date/time datatype,
why the dateFormat() function?  my understanding is that it's more for
formatting output/display (also, if it's a date/time datatype, no single
quotes).

i'd think if anything, you want to throw a createODBCDate() around that.

SELECT *
FROM whats_new
WHERE dateAdded >= #createODBCDate(dateAdd('d', -7, now())#

----- Original Message -----
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 9:39 AM
Subject: RE: 7 days old

> oops in the code you will need to surround the dateFormat with the #'s
>
> 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]

Reply via email to