You can do it in the query. You just need to use Oracle date functions to do 
it. Try this:
<cfquery name="findlastyear" datasource="enrichment"> 
select *
from mydevelopmentevents 
where realdate 
Between <cfqueryparam cfsqltype="cf_sql_timestamp" 
value="#CreateODBCDate(begin)# ">
and <cfqueryparam cfsqltype="cf_sql_timestamp" 
value="#CreateODBCDate(end)#">
order by realdate
</cfquery>

Not knowing what format "begin" and "end" are in means this might still need 
some fine-tuning. You might not need the createodbcdate at all, though I 
don't _think_ it will hurt anything as long as you use cfqueryparam - it 
_should_ convert it to the proper oracle date/time format. You will also 
want to consider whether time is of importance, here. If you don't add a 
time for end, I believe you're going to get midnight, which is probably not 
what you want, as you could be loosing some events that are right at the end 
of your range. You can use trunc(realdate) to drop off the time from your 
oracle column (no # signs - it's an oracle function).

On 9/19/05, M <[EMAIL PROTECTED]> wrote:
> 
> NOOOOOOOOOOOOooooooooooooooo. . . . though I know the answer is yes. . . I
> was just hoping that the fact that my head hurts over this was just a
> function of it being Monday morning!
> 
> Thank you! So sad. . . I really needed to do the conversion/comparison
> within the query so that I could create the lovely pie charts they like so
> much for the annual report (one pie chart -- all programs).
> 
> 
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218624
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to