473,412 Members | 2,003 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,412 software developers and data experts.

Comparing Difference (in Years) Between Two Dates & Totalling -Troubleshooting

Hi,

I've setup a query that compares the difference (in years) between two
date fields (Joining Date & Date Cancelled) and then totals how many
people fit into each category (0 years, 1 year, 2 years etc.).

The query is setup so that it only counts records that have both a
joining and cancelled date.

My problem is that when I remove the totals and view in datasheet
view, it says there are 147 records. But when I add the totals and
view in datasheet view, there is an extra row at the top with no value
but a count of 2:

-2
0-37
1-49
2-33
3-11
4-11
5-3
6-2
7-1

This brings the total up to 149, which is wrong.

I can't attach a screenshot, but here are the details of how my query
is setup (there are 3 columns used - ** indicate field boundary):

Field: *Years: DateDiff("yyyy",[Joining Date],[Date Cancelled])*
*Joining Date* *Date Cancelled*
Table: * * *Past Members* *Past Members*
Total: *Group By* *Count* *Count*
Sort: *Ascending* * * * *
Show: *Ticked* *Ticked* *Not Ticked*
Criteria: * * *Is Not Null* *Is Not Null*
Or: * * * * * *
Could anyone please help me work out why that extra row at the top is
appearing and adding two onto my totals?

Thank you very much!

Shari
Aug 28 '08 #1
0 2311

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

Similar topics

2
by: Adrian Parker | last post by:
I have a server app which is sent a date in the local format of the client machine. I've no control over the client app at all, so have to code at the server end to cope with any problems. The...
6
by: ss | last post by:
Hi I built an exe in console debug mode & Release mode . The console debug mode -exe works fine ...but the release mode EXE starts well but fails mid way . The exe is being started as a...
2
by: Alex | last post by:
I need to calculate the number of days between two dates formatted yyyymmdd. Besides creating a whole date class, is there a simpler method of doing it? for example: 20050203 - 20050201 = 2 ...
26
by: Frank | last post by:
For my website i would like to display the age of my son in years, months, days and hours. For now i manage to get a result for totals. Like the total number of days. This is the beginning: ...
1
by: bradleyc | last post by:
How would you calculate the difference between two dates?
1
by: sharathragunathan | last post by:
HI, I have an Access novice and I have a question.I have a form that has a request date that a user enters. What I need is when you click on a command button, say Elapsed Time, it should give...
3
by: Phoe6 | last post by:
I would like to parse RFC 1123 date format and compare two dates. I find that datetime module does not specifically confirms to any RFC. Any suggestions as how I can handle the RFC 1123 date...
5
by: alcool | last post by:
hi, I have 2 date/time values i.e. the system date/time and (h:m dd:mm:yyyy). I would like know to find a routine that calculate this difference. Maybe using the struct time_t and difftime. ...
3
by: prashantkuppa | last post by:
hi, iam struggling with difference between two dates of format type dd/mm/yyyy i need difference between two dates olddate(dd/mm/yyyy) - newdate(dd/mm/yyyy) and this should be in java script...
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
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
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.