start and end times of worker in a day

  • Thread starter Thread starter David Clasper
  • Start date Start date
D

David Clasper

Hi,
i have a table which contains numerous records for different days. Witihn
the table is a start and finish time for each job. What i need to know is
how do i extract the start time of the first job abnd the finish time of the
last job.
start time and finish time are in seperate fields and the start time of the
earliest job and the finish time of the last job.
i will need multiple days worth to show on the form/report
 
There's a typo half-way through your post: abnd, which makes things
confusing.

You also need a record creation date for each record, with a default value
of the current date. That way you'll know which records correspond to the
start and end of the project and be able to determine the start and end of
the project.
 
Hi,
i have a table which contains numerous records for different days. Witihn
the table is a start and finish time for each job. What i need to know is
how do i extract the start time of the first job abnd the finish time of the
last job.
start time and finish time are in seperate fields and the start time of the
earliest job and the finish time of the last job.
i will need multiple days worth to show on the form/report

How do you define "first job" and "last job"? Do you have a date field
as well as a time field? Does one "job" span multiple days, or is each
day's work one job? Do you want the start time of the first record in
your entire table, and the end time of the "last" record in your
entire table, or do a group of records belong "together"?


John W. Vinson[MVP]
 
David said:
i have a table which contains numerous records for different days. Witihn
the table is a start and finish time for each job. What i need to know is
how do i extract the start time of the first job abnd the finish time of the
last job.
start time and finish time are in seperate fields and the start time of the
earliest job and the finish time of the last job.
i will need multiple days worth to show on the form/report


Does this query do what you want?

SELECT DateValue(start) As Day,
Min(start) As Earliest,
Max(finish) As Latest
FROM sometable
GROUP BY DateValue(start)
 
Back
Top