doh...that's what I meant...quote not parenthesis

-----Original Message-----
From: Kevin Schmidt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 5:15 PM
To: CF-Talk
Subject: Re: date range search


Lose the single quotes around your date variables in your SQL.
----- Original Message -----
From: "Tumy, Brad" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, April 03, 2001 2:43 PM
Subject: RE: date range search


> shot in the dark...is it the single paranthesis around the date variable?
>
> Brad
>
> -----Original Message-----
> From: Robert Orlini [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 03, 2001 4:30 PM
> To: CF-Talk
> Subject: date range search
>
>
> I'm working on a search form which can search between a range of dates.
I'm
> using the code below and searching a orderdate column with the dates
> converted to 00/00/00 format and specified as Date/Time in Access.
>
> When I run the search (which uses a drop-down menu) I get a "data type
> mismatch in criteria expression" error.
>
> I beleive it may be with the dateformat function. Any suggestions please?
>
> Thanks in advance. :)
>
> -----------------------------------------------
>
> <CFSET startdate = "#Createdate(Year,Month,Day)#">
> <CFSET enddate = "#Createdate(Year2,Month2,Day2)#">
> <cfset startdate = #dateformat(startdate,'mm/dd/yy')#>
> <cfset enddate = #dateformat(enddate,'mm/dd/yy')#>
>
> <CFQUERY name="getwweb" datasource="wwebsales">
> SELECT * FROM wwebsales
> where orderdate between '#startdate#' and '#enddate#'
> </cfquery>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to