time calculations

R

rigby

Hi
I have a form where i would like to have people enter details for a
timesheet. i have columns called [Time on Duty] and [Time off Duty] and then
another comlumn which i want to calculate the total amount of time (in hours,
eg. 8.5 hours). i am not used to these kinds of calculations. how can i
create a formula for this and with a result like above (eg. 8.5 hours or 7.25
hours where it only works in half or quarter hours)??

Please coculd someone help me with this.
Rigby
 
A

Allen Browne

See:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html

To work in quarter hours, use DateDiff() to get the difference in minutes,
divide by 15, use CLng() on the result to lose the factions, and then
multiply by 15 to get the minutes again.
 

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