Something like this works well in mySQL...
<cfquery name="pageQuery" datasource="#application.dbName#">
Select count(*) as pageCount, dayOfMonth(activityDate) as dayOfMonth,
activityDate
from Activity
Where activityDate > #createODBCDate(startDate)#
And activityDate < #createODBCDate(endDate)#
GROUP BY dayOfMonth
ORDER BY activityDate
</cfquery>
its a summary of activity by day - activitydate is a timestamp...
Brett
B)
AJ Mercer wrote:
> have a look for date/time function available for your database server to
> format or build out date/time string and group on that
>
> 2009/11/23 <[email protected] <mailto:[email protected]>>
>
> Hi,
>
>
>
> I have a table that has duplicate records with columns of date and
> description and user
>
>
>
> I have a query that groups all the records by date and the sub
> groups those records by description which results in those duplicate
> records that were created on the same date with the same description
> to be grouped together
>
>
>
> The problem is that the date field has a time stamp which includes
> seconds therefore the above grouping does not capture all the
> duplicates given the seconds in the time stamp make many of the
> dates unique
>
>
>
> Is there some way I can get around this so that the grouping of the
> query only looks at the date component excluding the
>
> time component of the date/time stamp
>
>
>
>
>
> Regards
>
> Claude Raiola
> B.Econ (Acc), B.Hot.Mngt.
>
> Websites:
>
> www.SAMARIS.NET <http://www.samaris.net>
>
> Mobile: 0414 228 948
>
>
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "cfaussie" group.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To unsubscribe from this group, send email to
> [email protected]
> <mailto:cfaussie%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/cfaussie?hl=.
>
>
>
>
> --
> AJ Mercer
> http://webonix.net
> http://twitter.com/webonix
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "cfaussie" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/cfaussie?hl=.
--
Brett Payne-Rhodes
Eaglehawk Computing
t: +61 (0)8 9371-0471
m: +61 (0)414 371 047
e: [email protected]
w: http://www.yoursite.net.au
--
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=.