Well I figured it out on my own. The MySQL date_format()
function returns a string, not a datetime object, so when running my query of query in ColdFusion I used the CF_SQL_VARCHAR
datatype instead of CF_SQL_DATE
and everything worked fine.
(Update from comments)
The answer above turned out to be wrong. When I used CF_SQL_VARCHAR
I was getting unexpected results, in fact incomplete results. When I applied the STR_TO_DATE
function, it worked fine.