473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Group by Month

I'm creating a report that tracks calls. Each call has a date when the call
was received. I want to create a report that groups and totals all records
in a given month, however I don't want the individual dates for calls to
show up. What I want to do is basically create a report that shows:

The name of the Month (based on the dates the calls were received)
Total calls

I can get the totals, however how do I get just the month to display?

Thanks.
Nov 13 '05 #1
5 12507
Use the year([callreceivedDate]) function*100 plus the
month([callreceivedDate]) function in the underlying query. and group
on that number.

You can also add the month name from the
format([callreceiveddate],"mmmm") function
But that sorts April, December, February.....

Nov 13 '05 #2
In your query create an expression that calls the Format() function:

example - current month:

MonthName: Format(Now(),"mmmm")

example - where variable "MyDate" is a DateTime:

MonthName: Format([MyDate],"mmmm")

King Ron of Chi

Nov 13 '05 #3
> Use the year([callreceivedDate]) function*100 plus the
month([callreceivedDate]) function in the underlying query. and group
on that number.

You can also add the month name from the
format([callreceiveddate],"mmmm") function
But that sorts April, December, February.....


Thanks, that did the trick. I created two columns for the month, one so I
could get the long name and the other so I could sort on the numerical value
since as you said, it sorted April, December, February.
Nov 13 '05 #4
"Big Time" <bi************@remove-for-spam-hotmail.com> wrote in
news:dj**********@nntp.itservices.ubc.ca:
Use the year([callreceivedDate]) function*100 plus the
month([callreceivedDate]) function in the underlying query.
and group on that number.

You can also add the month name from the
format([callreceiveddate],"mmmm") function
But that sorts April, December, February.....


Thanks, that did the trick. I created two columns for the
month, one so I could get the long name and the other so I
could sort on the numerical value since as you said, it sorted
April, December, February.


Hope you cottoned onto the reason for how I defined the numeric
month, to include the year, because after you have accumulated
52 weeks of data, your month totals will get messed up.


--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #5

Hope you cottoned onto the reason for how I defined the numeric
month, to include the year, because after you have accumulated
52 weeks of data, your month totals will get messed up.


I did, and I appreciate it. I added a year field as well and grouped on
year then month. Thanks again.
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ian Bicking | last post by:
The Chicago Python User Group, ChiPy, will have its next meeting on Thursday, December 9th, starting at 7pm. For more information on ChiPy see http://chipy.org Topic ----- This month's...
4
by: bobb | last post by:
Is there a way to select count(*) by grouping by date, and having multiple date ranges? combining... select field,count(*) from table where datefield > 2004/1/1 and datefield < 2004/1/31 and...
1
by: Willa | last post by:
I have a table that i want to query and group the records by the month, what SQL stanment would i use? Somthing like this? apart from i know that the "Group BY (MM/YYYY)" wont work !:) ...
0
by: Brian Loesgen | last post by:
The next San Diego .Net User Group meeting is Tuesday, November 25, 2003 at the Scripps Ranch Library. Scripps Ranch Library 10301 Scripps Lake Drive San Diego, CA 92131-1026 Please join us...
1
by: Rajani | last post by:
Hello, I have a table(msaccess) with the structure... job_code text 6 style text 10 qty number fabrication text 65 ship_date date/time
1
by: Alicia | last post by:
I basically wanted something that would do a count of the dates, then group them by their week name.. BEFORE: Resource Date Total number of times that date Appeared (Count) 4/3/03 ...
6
by: Tony Miller | last post by:
All I have an aggregate query using the function Month & Year on a datereceived field ie: TheYear: Year() TheMonth: Month() These are the group by fields to give me a Count on another field by...
3
by: Sebastian | last post by:
Hello all I have a report where I have two nested groups. I know there are only three standard options for running sum: None, Over Group and Over All. I have a MyTextBox in detail section where...
2
by: Skips | last post by:
Hi, I am trying to create a query where I can retrieve average monthly balances for a client for all the months that we have data stored for the year ending 2007. The table has a balance, for...
5
by: Seb | last post by:
I want to count activity in a given month. I'm trying to do so with the linq code below however it reports: Error 1 'a' is inaccessible due to its protection level var ActivityByMonths = from a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.