Adding values of time

M

Mira

Hello,

I was wondering if anyone had any advise on how to add values together
when they were calculated using the datediff function.
I'm trying to calculate monthly totals of hours worked from a querie
created to calculate how many hours were worked from a start time and
an end time (less time taken for lunch).
Is this possible?

Thanks!
 
D

Duane Hookom

Yes, this is possible. Date and time values are numbers. You can add and
subtract them like any other numeric values. You can also use date functions
like DateAdd(), DateDiff(), etc. Keep in mind times are stored as a percent
of an entire day. For instance 6:00 AM is .25 and noon is .5.
 
L

louonline

Mira said:
Hello,

I was wondering if anyone had any advise on how to add values together
when they were calculated using the datediff function.
I'm trying to calculate monthly totals of hours worked from a querie
created to calculate how many hours were worked from a start time and
an end time (less time taken for lunch).
Is this possible?

Thanks!


This is the code I have in the ControlSource of a TextBox named
[TotalTimeWorked]

=Format(([FinishTime]-[StartTime])-([EndLunch]-[StartLunch])," hh""
Hrs. "": nn") & " Mins."

The above code is for ONE DAY only.
You would have to add the [TotalTimeWorked] for each day worked during
the month.
Be sure to have the right time format for [StartTime], [FinishTime]
etc.

Lou
 

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