In the select statement of your query you can use the SQL Server DatePart
function as I copy and paste from the SQL Server help file, any questions
let me know:

---------Begin Shameless Copying----------

Datepart ()

Returns an integer representing the specified datepart of the specified
date.

Syntax
DATEPART(datepart, date)

Arguments

datepart
Is the parameter that specifies the part of the date to return. The table
lists dateparts and abbreviations recognized by Microsoft� SQL Server�.


Datepart Abbreviations
year yy, yyyy
quarter qq, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
weekday dw
hour hh
minute mi, n
second ss, s
millisecond ms


--------------End Shameless Copying-----------------

Gregory Harris
[EMAIL PROTECTED]

-----Original Message-----
From: Jeff Beer [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 1:59 PM
To: CF-Talk
Subject: Group by on date/time field


<cf_BrainFart>

I have a query that needs to be output in groups based on a datetime
value (SQL Server 7.0/2000).

The trouble I'm having is with the time value.  I need to group on the
date alone.

Do I need to store the values seperately, or can SQL parse it in the
query as only the date portion so CF can use it in the <cfoutput
group="">?

</CF_BrainFart>





Jeff Beer
Director of Application Development
Digital Stormfront, Inc
http://www.digitalstormfront.com <http://www.digitalstormfront.com>



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to