Time calculations to and from a referance

  • Thread starter Chris B via AccessMonster.com
  • Start date
C

Chris B via AccessMonster.com

I have start and end time formatted as "YYMMDD HH.NN", I need to calculate
hours to Midnight of the start day and then hours from Midnight of the start
day to end time (could be several days later or even the same day), thus
giving normal time and overtime (if applicable)

I already have a field total time calculated with DateDiff
and I have other fields called [normaltime] & [overtime]

Eg if start date #2005/06/01 10.00# and end is #2005/06/01 15.00# = 5 hrs
normal time and 0 hrs overtime.Normal time = Total Hrs

or start time #2005/06/01 10.00# and end is 2005/06/03 10.00# should = 14hrs
normal time and 34hrs overtime. Total hrs = Normal hrs + Overtime hrs

I have managed to use DateSerial for a Midnight referance and subtract it
from Total time etc but it bugs out if start and end day are the same or the
time exceeds 48hrs
I think I should be using some IIF functions??

Thanks for any help in advance !!
 

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