ro***********@heraeus.com.ph wrote:
Hello,
I'm trying to create a report that would show the time difference. Is
it possible to make a report like this?
Name Date Mode Time
John 09/27/05 In 6:32
09/27/05 Out 7:25
09/27/05 In 8:06 X:XX
09/27/05 Out 9:36
09/27/05 In 9:54 X:XX
... where X:XX is the difference between the Out and next In. The data
is from a single table. How can I do this in report design?
Any advice is appreciated. Thank you!
Ronald
I suppose in your query for the recordsource of the report you could
create a column that returns the date/time for the previous record
I don't know if you have separate columns for date and time or one field
for the date/time. This is air code but should give you an idea
PreviousTime : Dmax("DateField","TimeSheetTable",_
"DateField < #" & [DateField] & "#")
You are querying to get the DateTime stamp from a record in
TimeSheetTable where the datetime field is less than the current
datetime field. You may need to further filter it by employee id or
only use datetimes for that specific day. If you do filter it, you may
end up with a null value so you need to check for that when you subtract
the 2 datetime stamps. See DateDiff and Format for options to display
the difference.