A family of Microsoft relational database management systems designed for ease of use.
Check, and correct for, if Time Out is earlier than Time In:
Hours = (DateDiff("n", [TimeIn], Abs(DateAdd("d", [TimeIn] >= [TimeOut], [TimeOut]))) \ 6) / 10
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I have Time In and Time Out in my table
i want to calculate the total Hours between Time In & Out. I am using the following expression.
(DateDiff("n",[TimeIn],[TimeOut])\6)/10
Suppose my Time In is 16:00 and time out is 00:00
It gives -16 but the actual Hours are 8.
How can i calculate this?
I think it is due to the change of date. But how to resolve this problem i have no idea.
Please Help
Thanks in Advance
Atif Mahmood
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Check, and correct for, if Time Out is earlier than Time In:
Hours = (DateDiff("n", [TimeIn], Abs(DateAdd("d", [TimeIn] >= [TimeOut], [TimeOut]))) \ 6) / 10
Thanks, it worked