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

Daily counts

I'm struggling to come up with a query/report of daily attendance for
records that have only start and stop dates. A x-tab (with parameters that
records be within a selected date range) would seem to be the way to go
here, but how do I get a count for each date within that range?

thanks -Ed
Jun 27 '08 #1
3 1734
On May 12, 9:24*am, "Ed Robichaud" <edrobich...@wdn.comwrote:
I'm struggling to come up with a query/report of daily attendance for
records that have only start and stop dates. *A x-tab (with parameters that
records be within a selected date range) * would seem to be the way to go
here, but how do I get a count for each date within that range?

thanks -Ed
Try using datediff in the query field.
Without seeing an example of your table I cn't be sure, but you might
put a conditional (datediff('d',FieldDate,date())=1) then sum instead
of count
P
Jun 27 '08 #2
Thanks, I'm familiar with the DateDiff function, but what I would really
like is a method to calculate the # of folks present for each day within a
user selected date range.

The date-filtered query now returns records with:
ID, startdate, stopdate, etc.

i.e. 001; 3/2/08; 3/20/08;...
002; 3/1/08; 3/18/08;...
003; 03/15/08;3/20/08;...

For example, I can find how many folks were present sometime within
3/1/08-3/31-08, but I'd like a daily count of those present for:

3/1/08
3/2/08
3/308
....
3/31/08

-Ed

"Pachydermitis" <pr*******@gmail.comwrote in message
news:fc**********************************@w8g2000p rd.googlegroups.com...
On May 12, 9:24 am, "Ed Robichaud" <edrobich...@wdn.comwrote:
I'm struggling to come up with a query/report of daily attendance for
records that have only start and stop dates. A x-tab (with parameters that
records be within a selected date range) would seem to be the way to go
here, but how do I get a count for each date within that range?

thanks -Ed
Try using datediff in the query field.
Without seeing an example of your table I cn't be sure, but you might
put a conditional (datediff('d',FieldDate,date())=1) then sum instead
of count
P
Jun 27 '08 #3
On May 12, 12:24*pm, "Ed Robichaud" <edrobich...@wdn.comwrote:
I'm struggling to come up with a query/report of daily attendance for
records that have only start and stop dates. *A x-tab (with parameters that
records be within a selected date range) * would seem to be the way to go
here, but how do I get a count for each date within that range?

thanks -Ed
Create a calculated field in the query that determines if the date
falls between the start and stop dates, returning the number 1 if
true, and 0 if false, then sum those numbers.

isPresent: IIF([Enter Date]>=[Start] AND [Enter Date]<=[stop],1,0)

Q
Jun 27 '08 #4

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

Similar topics

7
by: Paddy McCarthy | last post by:
I sent the following this morning: -------- Original Message -------- Subject: Threats to the: Daily Python URL! Date: Mon, 19 Apr 2004 07:50:04 +0100 From: Donald 'Paddy' McCarthy...
5
by: Steven Bethard | last post by:
I have a list of dictionaries. Each dictionary holds counts of various 'words', e.g.: py> countdicts = I need to select dicts with the constraint that the number of each 'word' totalled...
0
by: Andres | last post by:
Hi, i have this questions: 1 - How can i create user counts in Windows with C#? 2 - How can i set permissions for the counts with C#? 3 - How can i start an application with one of the created...
5
by: WertmanTheMad | last post by:
Ive been playing with this for a few days and thought I might thow it out for seggestions. I have Several Queries that need counts returned The Queries are Mutually Exclusive meaning whatever...
1
by: poohnie08 | last post by:
i have a excel spreadsheet showing staff name, date,work hour, ot hour, slot1, slot2, slot3, slot4 and others). The "()" will keep repeating from day 1 until end of month. eg in excel spreadsheet,...
13
by: i. Wiin | last post by:
I've got a daily based crystal report that doesn't show 0's for days where no activity occurred. How do I get 0 values to show up in the report?
0
by: George L. Sexton | last post by:
MH Software, Inc. is pleased to announce the release of version 3.2.11 of its Connect Daily web calendar software. This is primarily a small feature release with a few bug fixes. Topics in this...
0
by: ambelkar | last post by:
hi, I trying to join weekly & daily tables by using end_dte,Rpt_dte respectively.My week is saturday to friday.first table only having week end' dates but the 2 daily table having daily dates .when...
3
by: Wildster | last post by:
Hi, How can you count x and y as seperate counts from the same field? i.e. A table has the field Gender and I want to have one count which counts the number of records with 'male' as the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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...

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.