Time interval

N

Nestor

Brief description of the database: We are producing 25000
parts a day. The parts have different styles (ex. 10-A,
10-B, 10-C, etc). Each part has its own characteristics
and are slightly different. We can produce different
parts per day by changing the setup

Problem Description: I need to find out, in a report or
query, the time interval between the starting of the first
part (10-A) and ending time of the part (10-A) produced
per day.

Example:
Part 10-A Start 6:00a.m End Production 9:00 a.m
Part 10-B Start 9:15 a.m End Production 2:15 p.m.
Part 10-C Start 2:30 p.m. End Production 6:00 p.m.
Part 10-A Start 6:15p.m. End Production 11:30 p.m.

For this day I would like to get the following Information;
Part 10-A 6:00 a.m. to 9:00 a.m. and
6:15 p.m. to 11:30 p.m.
Part 10-B 9:15 a.m. to 2:15 p.m.
Part 10-C 2:30 p.m. to 6:00 p.m.

Each part is uniquely Identify by part id.

Conclusion: I need to find out the time when the first
part and the last part was produce per part style. Please
reply with any idea you may have. If you need some more
information please contact me at (e-mail address removed). Thank
you very much!
 
M

Michel Walsh

Hi,


It seems, at first, just a total query:

SELECT TypeID, DateValue(StartingTime), MIN(TimeValue(StartingTime)), MIN(TimeValue(EndingTime))
FROM somewhere
GROUP BY TypeID, DateValue(StartingTime)


I assume a field StartingTime stores the starting (date and ) time value for. DateValue get the
date part out of it; TimeValue, the time part.
I assume the record has at least three fields, the type, the starting time, and the ending time.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top