Time calculation

E

E

I need to calculate the time it takes between procedures to set up a room.
Here is some sample data

Date Room TimeIn TimeOut
1/05/06 A 11:30 AM 11:47 AM
1/05/06 A 12:02 PM 1:12 PM
1/05/06 B 8:47 AM 10:17 AM

Basically, I need to subtract the TimeOut in record 1 from the TimeIn for
record 2 to get my set-up time.

Thanks
 
B

Barry Gilbert

SELECT Table1.Date, Table1.Room, Table1.TimeIn, Table1.TimeOut,
DateDiff("n",DMax("timeOut","Table1","[Date] = #" & [Date] & "# AND
[TimeOut]< #" & [TimeIn] & "# And [Room] = '" & [room] & "'"),[timein]) AS
SetupTimeMinutes
FROM Table1;

Change table name and field names to your own.

HTH,
Barry
 

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