>- see footer for list info -< Have you tried any WHERE clauses? SELECT Count(Regdate) AS CountOfRegdate, Regdate FROM Companies WHERE RegDate = [CF/SQL date of some sort] GROUP BY Regdate
Are you doing this inline or in an SP? What DB is it? You can convert the dates stored to fit your needs in the WHERE clause be it date parts or string functions to get at the relevant bit's of the date. Ade -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gordon Burns Sent: 28 March 2005 09:50 To: Coldfusion Development Subject: [CF-Dev] Dates >- see footer for list info -< I confess I do not like working with dates.. I have a table where a date is entered using the Date(now) function automatically. So we end up with a Date Time Object. I need to run a query to find counts of all the numbers of new entries by date. eg.. 5 on Wednesday 6 on Tuesday etc. Really simple stiff like: <cfquery name="getdata" datasource="#dsn#"> SELECT Count(abc.Regdate) AS CountOfRegdate, ABC.Regdate FROM Companies GROUP BY Companies.Regdate </cfquery> where Regdate is the date I am after. This only works if the record is identical to the second. What is the syntax to Group by and get the totals by day? Any sugesstions appreciated. Gordon _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005 _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
