opensubscriber
   Find in this group all groups
 
Unknown more information…

c : cf-talk@houseoffusion.com 31 July 2006 • 11:07AM -0400

Re: Anyone see anything wrong with this code?
by Denny Valliant

REPLY TO AUTHOR
 
REPLY TO GROUP




I'm pretty sure it includes the start and end date, but one thing to keep in
mind,
if you start using datetimes, is the 24:00 (the time part) on the end
datetime.
Don't look like it, but keep it in a corner of the mind, JIC. Or whatever.
heh.

Does cfqueryparam automagically transform "plain text" dates into real
dates?
Somehow I think it does, negating the use of createODBCdate, and, if
it's an invalid date, createODBCdate will throw an error, so be sure to
check
that it's valid first.  Guess you'd get an error either way.

One thing that I always wonder... how does CF know if it's mm/dd/yy, or
dd/mm/yy?
Guess it defaults to one of them, right?  Man, dates are so fun.

Just random musing, no real help here, move along.
:Denny

On 7/30/06, Bobby Hartsfield <bobby@acod...> wrote:
>
> Try #createODBCDate(form.start_date)#
> And #createODBCDate(form.end_date)#
> ....no quotes
>
> There are also other ways... like...
>
> Where Client_Birthday BETWEEN #createODBCDate(form.start_date)# AND
> #createODBCDate(form.end_date)#
>
> I cant remember if that actually includes the start and end date as being
> BETWEEN them.. but if not, just use dateadd 1 and -1 on them
>
> ..:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
>
>
>
> -----Original Message-----
> From: Michael E. Carluen [mailto:cf_mecarluen@comc...]
> Sent: Sunday, July 30, 2006 8:12 PM
> To: CF-Talk
> Subject: RE: Anyone see anything wrong with this code?
>
>
> >            where Client_Birthdate >= '#Form.Start_Date#'
> >              and Client_Birthdate <= '#Form.End_Date#'
>
> Rick, Try using <cfqueryparam> on the dates.
>
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four times a year.
http://www.fusionauthority.com/quarterly

Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248196
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=20547.15921.4

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.