Barney,

Thanks for the help. Very interest. CFQUERYPARAM is one of those tags I 
never bothered to look at. Now can see a lot of bennies for using.

I also found that the searching for  <= and => seems to do work, i.e.,

TransactionDateTime <= #EndDate# AND TransactionDateTime >=#StartDate#

Nick



At 07:47 PM 12/13/2004, you wrote:
>Use CFQUERPARAM and it'll work.  Or, if you must directly supply them
>for some reason, pass them as a string formatted like this "yyyy-MM-dd
>HH:mm:ss".
>
>Depending on your version of MySQL, various numeric formats may or may
>not work, but strings formatted as above will always work.  But just
>use CFQUERYPARAM with type CF_SQL_TIMESTAMP and you won't have any
>issues.
>
>And keep in mind that leaving off the time part means midnight, it
>doesn't mean any time that day.  That goes for every database you've
>got datetime columns, unless you're casting.
>
>cheers,
>barneyb
>
>On Mon, 13 Dec 2004 19:31:18 -0600, Nick Baker <[EMAIL PROTECTED]> wrote:
> > I can get a search between the ID numbers to work, but not a search between
> > dates.
> >
> > I am working if the problem may be the way I have the dates formatted? The
> > dates entered in the Database where entered using Now() and the field
> > format was "DateTime"
> >
> > Works
> >
> > The following search for a range of ID numbers
> >
> > Where DomainName = '#TargetURL#' AND ID BETWEEN 64112 AND 64579
> >
> > Does not Work
> >
> > The following search for a range of dates
> >
> > <cfset StartDate = DateAdd("d", -1, DateConvert("local2utc", Now())) >
> > <cfset EndDate = DateConvert("local2utc", Now())>
> >
> > Where BizName = '#TargetBIZ#' AND TransactionDateTime BETWEEN #EndDate# AND
> > #StartDate#
> >
> > Thanks,
> >
> > Nick
> >
> >
>--
>Barney Boisvert
>[EMAIL PROTECTED]
>360.319.6145
>http://www.barneyb.com/blog/
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187503
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to