TRY:
WHERE trunc(eventdate) BETWEEN
TO_DATE('#DateFormat(variables.Begindate,"dd/mm/yyyy")#','DD/MM/YYYY')
AND TO_DATE('#DateFormat(variables.Enddate,"dd/mm/yyyy")#','DD/MM/YYYY')
OR you can use 'MM/DD/YYYY' as formatting mask if you prefer
Pascal
-----Original Message-----
From: [EMAIL PROTECTED]
Sent: wo 21-11-2001 15:29
To: CF-Talk
Cc:
Subject: Any Oracle Experts on the List ???? Errors
Hi
I am getting the following Oracle error message when trying to
run the query below, any ideas on the possible cause would be most
appreciated
----------
<cfset MonthsToDisplay = 2>
<cfset BeginDate = "#Month(now())#/1/#Year(now())#">
<cfset EndDate = "#Month(DateAdd("m",
MonthsToDisplay,now()))#/#DaysInMonth(DateAdd("m",
MonthsToDisplay,now()))#/#Year(DateAdd("m", MonthsToDisplay, now()))#">
<cfquery name="getupcomingevents" datasource="events">
SELECT eventid, eventdate, to_char(eventdate,'YYYY') AS
eventYear, to_char(eventdate,'MM') AS eventMonth, longtitle, location
FROM whatson
WHERE eventdate BETWEEN trunc(#CreateODBCDate(BeginDate)#) AND
trunc(#CreateODBCDate(EndDate)#)
ORDER BY eventdate asc
</cfquery>
-----------------
------------------------------------------------------------------------
--------
Error Occurred While Processing Request
Error Diagnostic Information
Oracle Error Code = 911
ORA-00911: invalid character
The error occurred while processing an element with a general
identifier of (CFQUERY), occupying document position (12:1) to (12:54).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists