> select cast(floor(cast(datefield as float)) as datetime) > as mydate, > sum(numberfield) as mysum > from table > group by cast(floor(cast(datefield as float)) as datetime)
> It converts the date to a number, takes the integer of > that (midnight), then > converts it back to a date. Wow... there's a little known but extremely useful trick. :) Isaac Dealey Certified Advanced ColdFusion Developer www.turnkey.to 954-776-0046 ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists