Ah... learn something new everyday. Good to know.

G!

On Thu, Dec 17, 2009 at 12:10 PM, Jason Fisher <[email protected]>Ah... learn
something  wrote:

>
> With queryparam you don't need the createODBCDate() function:
>
>
> SELECT   blah....
> FROM      tblCalendar
> WHERE   EventDate BETWEEN    <cfqueryparam cfsqltype="CF_SQL_DATE"
> value="#form.someStartDate#" />
> AND <cfqueryparam cfsqltype="CF_SQL_DATE" value="#form.someEndDate#" />
>
> Also, note that in SQL Server, the assumption is midnight, so that the end
> date is really the day before, so you could do this before your query:
>
> <cfset endDate = dateAdd("d", 1, form.someEndDate) />
>
> and then use that in the query:
>
> ...
> AND <cfqueryparam cfsqltype="CF_SQL_DATE" value="#endDate#" />
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329232
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to