Mark,

Should have thought of that although I still get an error:

Variable YYYY is undefined.

So I tried single quotes around timestamp and got the following error:

Parameter validation error for function DATEPART. 
The value of the parameter 2, which is currently "timestamp", must be a class java.util.Date value.

I'm assuming that CF and reactor are seeing that as a literal string again. If I put single or double quotes around YYYY I get the "Variable YYYY is undefined." error again.

Anyone have any ideas?

Thanks,

Ray


On 6/9/06, Mark Mazelin <[EMAIL PROTECTED]> wrote:
Try removing the quotes around your function call otherwise Reactor sees
the function call as a literal string:

<cfset reportQuery.getWhere().isEqual("ARCommunity", DATEPART(YYYY,
timestamp), "#attributes.reportYear#") />

Mark

Ray Buechler wrote:

>
> This line of code:
>
> <cfset reportQuery.getWhere().isEqual("ARCommunity", "DATEPART(YYYY,
> timestamp)", "#attributes.reportYear#") />
>
> Generates the following error:
>
> The field 'DATEPART(YYYY, timestamp)' does not exist for the
> 'arCommunity' object.
>
> If it is not obvious, I am trying to pull records from a specific year
> from a datetime field.
>
> My questions are:
>
> A. Is there a mistake in my code?
>
> B. Am I trying to do something that Reator is not designed to do?
>
> C. Is this a bug in Reactor?
>
> Thanks!
>
> Ray
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- --
> Reactor for ColdFusion Mailing List
> [email protected]
> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- --



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to