Time Calculations

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I know that I posted a question about calculation of time
in queries. I am still having a problem i used the
datediff "n" function and I still have an improper
amount. I created a table called time and I have the
following fields Name, Time In, Time Out
I created a query with that table using the fields above
and the a new field with the date diff function. My
problem is when i put in a time like 18:45-07:15 going
from PM to AM i don't get the right amount it gives me a
total time of 11 hours when it should be 12:30. Am I
doing something wrong do I need to change to format using
short time or long time. Please someone help. Thanks for
all the previous help and your time.

PS: it works fine when i do something like 07:00-20:00 it
gives me the right time total 13:00 but thats AM to PM
not PM to AM!
 
The easiest way to compensate for going past midnight is to include the date
with the time. Access will then know that it is a different date and will
give the answer accordingly.

You say you are currently receiving 11 hours as the output? It should
actually be -11:30.
 
You'll need to post more details. Most of us are not aware of your earlier
thread, and we don't know the setup that you're using.
 
Back
Top