I would have to give a most definite "it depends". If, as your original
question states, you want to ALWAYS put messages up for a week at a time, I
would go with one date (see my previous response). If you think there will
be a need (now or in the future) to "run this message for 2 weeks but that
one for 3 days" etc. than you will want to go with 2 dates. Don't forget to
code a default message in case someone didn't remember to update the
database with next weeks message. ;-)
HTH
Stephen
-----Original Message-----
From: SHEETS, DAYV (PB) [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 1:26 PM
To: CF-Server
Subject: RE: Weekly Date Driven Content in Cold Fusion?
So should I name the column "my_date_column" and if the date falls within
the date span from the current date it will then be displayed, OR should I
instead have two columns; one named "start_date" and one named "end_date"?
Please clarify...
Thanks again for all of your responses! :)
Dayv
-----Original Message-----
From: Heath Tucker [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 7:13 AM
To: CF-Server
Subject: Re: Weekly Date Driven Content in Cold Fusion?
I would go so far as to run a dateformat statement on the input dates
to insure they are read correctly.
#DateFormat(Now(),"mm/dd/yyyy")#
<cfquery name="..." datasource="...">
SELECT *
FROM mytable
WHERE my_date_column >= #DateFormat(form.start_date,"mm/dd/yyyy")# and
my_date_column <= #DateFormat(form.end_date,"mm/dd/yyyy")#
</cfquery>
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "CF-Server" <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 8:40 AM
Subject: Re: Weekly Date Driven Content in Cold Fusion?
>
>
> I think he actually wants something like this:
> <cfquery name="..." datasource="...">
> select * from mytable where my_date_column >= #form.start_date# and
> my_date_column <= #form.end_date#
> </cfquery>
>
>
> tom
>
>
>
> Of course!
>
> try somethig like this:
>
> <cfquery name="..." datasource="...">
> select * from mytable where start_date <= #createodbcdate(now())# and
> end_date >= #createodbcdate(now())#
> </cfquery>
>
> Alejandro Mozo Quesada
> Sistemas / Programaci
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com