How can I sum calculated time?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to sum time. I have time in and time out. I am hiding the details and
want o have a footer =sum[hours worked]? I can't get it to work? I'D LOVE
HELP!!! I used elapsed time HoursandMinutes([field names])
 
To get the elapsed time in minutes, try:
=Sum( DateDiff("n",[TimeIn], [TimeOut]) )
Divide the above expression by 60 to get the number of hours.
 
My input forms works great! I have a the standard Time In/Time Out defaulting
to start and end times. I have a checkbox if the person is absent--making
data entry as quick as possible. This Attendance Database is for my husband's
nonprofit--they have to report so much information to the government. Now
they want to know how much actual time is spent, and they need to provide
reports. People can leave for therapy/appointments, so I'm recording areas if
they leave (2 separate time in/time outs). It works out great. Here are some
fields from my query. (I used HoursjAndMinutes from Elapsed time.) [Date] is
the date of the day worked.

Total:
HoursAndMinutes(([TimeOut]-[TimeIn])-nz(([TimeOut2]-[TimeIn2]))-nz(([TimeOut3]-[TimeIn3])))

Total Time: IIf([Absent]=-1,0,[Total])

Day of Month: Day([Date])

1: IIf([Day of Month]=1,[Total Time])


I created a similar payroll report, and I was trying to duplicate what I'd
previous done. I sorted by name and hid the details. I'm trying to put a
formula in the name footer--I need to see each person and the total hours
they worked each day of the month.

Field Header:
Name 1 2 3 4 5 6 7 8
9 (etc.)
Footer Fields on my report:
name =nz([1]) =nz([2]) (etc.)

Of course that doesn't work. At this point I just want to add up all the
time in [1]. I'm not getting the difference of times. Is there a way of
getting one field [Total Time] to total? I thought it would be great if I
could convert [Total Time] back to a number so I could add it all up and then
convert it back to display it as hours. I tried

TimeChange: CDbl([Total Time])

but that returned an error...

Well any help would be so greatly appreciated. Can I call Microsoft? I know
they charge a lot, but I don't even know if they'd help with a report design
question like this.
Duane Hookom said:
To get the elapsed time in minutes, try:
=Sum( DateDiff("n",[TimeIn], [TimeOut]) )
Divide the above expression by 60 to get the number of hours.
--
Duane Hookom
MS Access MVP
--

Rita said:
I want to sum time. I have time in and time out. I am hiding the details
and
want o have a footer =sum[hours worked]? I can't get it to work? I'D LOVE
HELP!!! I used elapsed time HoursandMinutes([field names])
 
It seems you have a thread going. Please use the more recent thread which
was started less than an hour after this one.
--
Duane Hookom
MS Access MVP
--

Rita said:
My input forms works great! I have a the standard Time In/Time Out
defaulting
to start and end times. I have a checkbox if the person is absent--making
data entry as quick as possible. This Attendance Database is for my
husband's
nonprofit--they have to report so much information to the government. Now
they want to know how much actual time is spent, and they need to provide
reports. People can leave for therapy/appointments, so I'm recording areas
if
they leave (2 separate time in/time outs). It works out great. Here are
some
fields from my query. (I used HoursjAndMinutes from Elapsed time.) [Date]
is
the date of the day worked.

Total:
HoursAndMinutes(([TimeOut]-[TimeIn])-nz(([TimeOut2]-[TimeIn2]))-nz(([TimeOut3]-[TimeIn3])))

Total Time: IIf([Absent]=-1,0,[Total])

Day of Month: Day([Date])

1: IIf([Day of Month]=1,[Total Time])


I created a similar payroll report, and I was trying to duplicate what I'd
previous done. I sorted by name and hid the details. I'm trying to put a
formula in the name footer--I need to see each person and the total hours
they worked each day of the month.

Field Header:
Name 1 2 3 4 5 6 7 8
9 (etc.)
Footer Fields on my report:
name =nz([1]) =nz([2]) (etc.)

Of course that doesn't work. At this point I just want to add up all the
time in [1]. I'm not getting the difference of times. Is there a way of
getting one field [Total Time] to total? I thought it would be great if I
could convert [Total Time] back to a number so I could add it all up and
then
convert it back to display it as hours. I tried

TimeChange: CDbl([Total Time])

but that returned an error...

Well any help would be so greatly appreciated. Can I call Microsoft? I
know
they charge a lot, but I don't even know if they'd help with a report
design
question like this.
Duane Hookom said:
To get the elapsed time in minutes, try:
=Sum( DateDiff("n",[TimeIn], [TimeOut]) )
Divide the above expression by 60 to get the number of hours.
--
Duane Hookom
MS Access MVP
--

Rita said:
I want to sum time. I have time in and time out. I am hiding the details
and
want o have a footer =sum[hours worked]? I can't get it to work? I'D
LOVE
HELP!!! I used elapsed time HoursandMinutes([field names])
 
Back
Top