How to calculate time difference?

  • Thread starter Thread starter barton
  • Start date Start date
B

barton

I have a table called report, and there is a column called time
the format of time is hh:mm, like 21:20
and i want to set up a query to calculate overtime
for example

Engineer time overtime
john 21:20 (this one to calculate
overtime, which is the time after 20:00)

what is the formula to calculate time?
i tried to type OT: [time]- 20:00 and it doesnt work.

so is there any method to calculate that?

thx all

--
One moment that for me epitomises my time here is when Steven Gerrard, my
new captain at the time, scored against Sofia and ran over to the touchline
to celebrate the goal with me and the staff. I want to stress again that
there is no bitterness; there is no ill feeling just a huge sadness at the
moment.
 
Elapsed time can be calculated as follows:

([EndDateTime] - [StartDateTime]) * 24

....or you can use the DateDiff function, but be careful how you use it or
your result may be off. Note that it is assumed that your field includes
the date AND time...if it does not, you need to make some changes in your
design to allow for the possibility of work spanning multiple days.
 
Thanks so much.. its done now!


--
One moment that for me epitomises my time here is when Steven Gerrard, my
new captain at the time, scored against Sofia and ran over to the touchline
to celebrate the goal with me and the staff. I want to stress again that
there is no bitterness; there is no ill feeling just a huge sadness at the
moment.

Paul Overway said:
Elapsed time can be calculated as follows:

([EndDateTime] - [StartDateTime]) * 24

...or you can use the DateDiff function, but be careful how you use it or
your result may be off. Note that it is assumed that your field includes
the date AND time...if it does not, you need to make some changes in your
design to allow for the possibility of work spanning multiple days.


barton said:
I have a table called report, and there is a column called time
the format of time is hh:mm, like 21:20
and i want to set up a query to calculate overtime
for example

Engineer time overtime
john 21:20 (this one to calculate
overtime, which is the time after 20:00)

what is the formula to calculate time?
i tried to type OT: [time]- 20:00 and it doesnt work.

so is there any method to calculate that?

thx all

--
One moment that for me epitomises my time here is when Steven Gerrard, my
new captain at the time, scored against Sofia and ran over to the touchline
to celebrate the goal with me and the staff. I want to stress again that
there is no bitterness; there is no ill feeling just a huge sadness at the
moment.
 
Back
Top