473,388 Members | 1,526 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,388 software developers and data experts.

Question on Count in Date Range

35 32bit
I am attempting to first calculate the number of days between a date and todays which I have accomplished: TimeElapsed: DateDiff("d",[DtDiscovered],Date()).

I then need to count the number of records that have a calculated number of days (TimeElapsed) above as follows in one query:

between 1-10, between 11-20, 21-30, 30-60, and over 60.

How can I accomplish this?
May 25 '10 #1

✓ answered by ADezii

@rhonda6373
Rather than explain how a Frequency Distribution works, just download the Demo Attachment that I have created for you. Any questions, feel free to ask.

5 1933
ADezii
8,834 Expert 8TB
@rhonda6373
This can be done by using what is called a Frequency Distribution. Give me a little time, and I'll pu together a simple demo for you.
May 25 '10 #2
rhonda6373
35 32bit
@ADezii
Great, thank you!
May 25 '10 #3
ADezii
8,834 Expert 8TB
@rhonda6373
Rather than explain how a Frequency Distribution works, just download the Demo Attachment that I have created for you. Any questions, feel free to ask.
Attached Files
File Type: zip Frequency Distribution.zip (16.7 KB, 101 views)
May 26 '10 #4
fdfjc
8
@rhonda6373
Hi Rhonda, Access makes it easy to do this in steps. In the first query you have figured the TimeElapsed. In the second query, you can use something like this: IIf([TimeElapsed] Between 29 And 59, 1 , 0) AS 30to60, IIf([TimeElapsed] Between 61 And 89, 1 , 0) AS 60to90 etc. Third query sums up each time period and gives you the total count. You call the last query in your code. I'm not great at explaining, so let me know if this isn't clear.
Brenda
May 26 '10 #5
rhonda6373
35 32bit
The Frequency Distribution worked great! Thank you so much! We have been working very long hours and this was something a director asked me for yesterday and I did not have the time or the brainpower to figure it out. This allowed me to create the report that was needed.

Brenda, thank you as well! I just now saw your post and will note this solution for future reference as well.
May 27 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Dennis M. Marks | last post by:
What is the maximum valid date range for the date(yyyy,mm,dd) function. -- Dennis M. Marks http://www.dcs-chico.com/~denmarks/ Replace domain.invalid with dcsi.net -----= Posted via...
5
by: Dennis M. Marks | last post by:
After reading section 15.9.1.1 the ECMAScript Language Specifications I see that the date range for the Date function is +/- 100,000,000 days from 01 Jan 1970. This is called an extrapolated...
3
by: rugger81 | last post by:
I am currently working in the sql server 2000 environment and I want to write a function to pull all dates within a given date range. I have created several diferent ways to do this but I am...
3
by: sunilkes | last post by:
I have an Access 2000 database, and I want the form to accept only one entry for a person for one date range. Example: If John (Saved in "USer" field) books "Start Date" 01/01/07 and "End...
2
by: sixdeuce62 | last post by:
Hello, I am trying to create a query that will prompt me to enter the parameter value if beginning date and ending date. I have created everything I need in the query, but I have to manually go...
1
by: devyon122 | last post by:
I'm trying to allow a user to type in a beginning data and an ending date to be used in a crosstab query - Below is the query: TRANSFORM Count(imagingdb.ID) AS CountOfID TRANSFORM...
0
by: mwalsh62 | last post by:
Greetings all! My first post here, and my mind is pudding at this point (any flavor you like)! I have been searching for days, and still can't figure out the proper syntax that I require. This...
5
by: jambonjamasb | last post by:
I am wanting to create a report that summarises the number of items within a date range. For example I have a FIELD called System_Change. This is a drop down COMBOBOX that uses words like unix,...
19
by: phill86 | last post by:
Hi I am re-posting this thread because it has become very confusing and I have got some way to solving the problem so it is a slightly different question from the initial thread. here is the...
3
by: Vinda | last post by:
Hi Bytes, Using a previous question as a base Access 2000 Inserting multiple rows based on a date range. I also wanted to insert multiple rows into a table according to a date range supplied by a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.