Will Tomlinson wrote:
>> Sorry, I blanked on the fact that you were doing a QoQ there... use this 
>> (not a QoQ)...
> 
> Dude, this works like a champ! Only one little problem left. THe date is ugly 
> in the cfchart. The data is all correct and grouped nicely tho'.
> 
> Is there some way to change the look of the datetime? I looked into convert() 
> in sql server but can't get it to work. 
> 

You were on the right track with convert...
Something like this:

SELECT FORMAT(char(10),DATEADD(d,DATEDIFF(d,0,orderdate),0),101) AS 
orderdate, sum(ordertotal) AS ordertotal
FROM tblOrders
WHERE orderdate > #createODBCdate(Now() - 7)#
GROUP BY FORMAT(char(10),DATEADD(d,DATEDIFF(d,0,orderdate),0),101)
ORDER BY FORMAT(char(10),DATEADD(d,DATEDIFF(d,0,orderdate),0),101) DESC

but the styles (the "101" part in the expression...listed in BOL) are 
somewhat limited, so you may be better off doing that in CF.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250573
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to