J
jeff G
I am attempting to create a report that would display the
calculated time between the first entry and last entry of
a day a person makes into a datatbase. The date field is
a general format and has both date and time information.
Here is the query I am using for the report:
SELECT tblContactNotes.EmployeeID, Min
(tblContactNotes.Date) AS MinOfDate, Max
(tblContactNotes.Date) AS MaxOfDate
FROM tblContacts INNER JOIN tblContactNotes ON
tblContacts.ID = tblContactNotes.ID
GROUP BY tblContactNotes.EmployeeID, DateValue([date]),
Format([date],"m/d/yy")
HAVING (((tblContactNotes.EmployeeID)=[enter initials])
AND ((DateValue([date])) Between [a] And ));
When I specify "between" values ([a] and ) that are in
2004, the query is displaying dates from 2002 and 2003 as
well as 2004. Also it is displaying mulitple entries on
some days. I would like to display only the earliest
time and latest time for each person for each day between
the date range. Also I would like another feild to
calculate the time diffeence in hours between the max and
min dates for each day.
thanks for any help.
Jeff G
calculated time between the first entry and last entry of
a day a person makes into a datatbase. The date field is
a general format and has both date and time information.
Here is the query I am using for the report:
SELECT tblContactNotes.EmployeeID, Min
(tblContactNotes.Date) AS MinOfDate, Max
(tblContactNotes.Date) AS MaxOfDate
FROM tblContacts INNER JOIN tblContactNotes ON
tblContacts.ID = tblContactNotes.ID
GROUP BY tblContactNotes.EmployeeID, DateValue([date]),
Format([date],"m/d/yy")
HAVING (((tblContactNotes.EmployeeID)=[enter initials])
AND ((DateValue([date])) Between [a] And ));
When I specify "between" values ([a] and ) that are in
2004, the query is displaying dates from 2002 and 2003 as
well as 2004. Also it is displaying mulitple entries on
some days. I would like to display only the earliest
time and latest time for each person for each day between
the date range. Also I would like another feild to
calculate the time diffeence in hours between the max and
min dates for each day.
thanks for any help.
Jeff G