How to calculate the total hours like :<br> 15:00 + 12:30 + 10:15 + 7:45<br>Since, when the total hours is more than 24:00<br>it becomes 0:00.<br><br><br>
So if the hours is more than 24 you want it to roll over to 1 Day?<br>There are several Date functions at your disposal:<br><br>DateDiff<br>DateAdd<br>DatePart<br>DateSerial<br>Now even though it says "DATE..." it will still add just hours and minutes.<br><br>Look at the "Format" Function too.<br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
The problem relates to a confusion between a Date/Time (which is a fixed point) and a duration (like 3 hours to accomplish a task).<br><br>You should NOT store durations as Date/Time. Store them as Number (Double).<br><br>You can then enter 15 hours and 30 minutes as 15.5 hours. <p>Jim Conrad<br><a href=mailto:jconrad3@visteon.com>jconrad3@visteon.com</a><br><a href= > </a><br>
Anyway thanks for the answer. <br><br>Simply speaking, I want to make a program that calculates <br>total hours of employees working overtime in 1 month. <br><br>The data is inputted daily, from and until what time does<br>that employee working overtime. Such as : From 15:00 to 19:15. In this case that employee works for 4:15 hours.<br><br>In one month (or in a couple of month) it will become more<br>than 24:00. <br><br>Since I'm a novice in access. Is there anyone have an idea<br>to solve that problem. <br><br>Thanks for the attention. <br>
In a query, add this expression:<br><br><FONT FACE=monospace><br>ElapsedTime:[EndTime]-[StartTime]*24<br></font><br><br>This will give you the number of hours (and fractions of hours). In your example, ElapsedTime = 4.25 hours <p>Jim Conrad<br><a href=mailto:jconrad3@visteon.com>jconrad3@visteon.com</a><br><a href= > </a><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.