Hello! I am trying to order a dynamically created query (query of query) by a date column. That does not work. Now I've tried the following line in order to
try to sort by a string: <cfset QuerySetCell(query1 "dt_new", DateFormat (query_original.date_field, "yyyymmdd")&TimeFormat (query_original.date_field, "HHmm"), query1 .currentrow)> <cfdump> shows me that the values are set correctly but a <cfquery dbtype="query" name="query_new"> SELECT * FROM query1 ORDER BY dt_new; </cfquery> still orders the values in a wrong order. It seems that only the first chars are checked for sorting. Any workarounds? I am thinking about adding several fields like "date_year", "date_month", ... and then performing an ORDER BY date_year,date_month, ... Software: MX; Updater 3 applied. Best regards, Peter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

