On 2/20/07, Casey Dougall <[EMAIL PROTECTED]> wrote: ...
> AND YEAR(DateField) = <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#URL.Archive#">
YEAR() doesn't return a date-- you know that, right?
mysql> *SELECT YEAR('98-02-03');*
-> 1998
Is there anything else I can use here? I want to use "cf_sql_date" I've
> tried doing createdate, datepart and the like, the query returns no
> results
> unless I run it as cf_sql_varchar or no queryparam at all.
The issue here, is if you want to use a date, use a date.
IE: You're trying to use a string (year()). That's why only string datatypes
will work. =]
Seems kinda odd but then again, the dam date field in mysql is wack anyway.
> I'm always having troubles with it and checking mysql documentation never
> helps, its like it was made by monkeys.
I've had no more trouble with MySQL dates than with any other. *shrug*
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
Is what I use, when I need it, and it's always been clear as day. =-/
I am pretty monkey-ish tho.
Hey hey =]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270263
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4