On Jul 27, 6:45*pm, "Rob Parker"
<NOSPAMrobppar...@optusnet.com.au.FORME> wrote:
> Date/time fields actually hold a number, where the integer portion
> represents the date as days since 30/12/1899, and the decimal portion
> represents the time as portion of 24 hours (eg. .5 is 12 hours). *If you're
> only storing the time component, the date component is 0. *What you need to
> do, when End Time is less than Start Time, is to add a day to the End Time.
> So you can set the controlsource for your elapsed time textbox to the
> following expression:
> =IIf([End Time]>[Start Time],[End Time]-[Start Time],([End Time]+1)-[Start
> Time])
>
> HTH,
>
> Rob
>
> "Robert Molina" <robertmolin...@gmail.com> wrote in message
>
> news:849c99b5-6285-44c9-a675-(E-Mail Removed)...
>
>
>
> > Im a beginner with Access 2007. I have a report where I need to
> > calculate elapsed time in hh:mm between "Start Time" and "End Time"
> > =[End Time]-[Start Time].
> > The problem occurs during the 3rd shift when entering start times
> > before midnight and end times after midnight. (this is a machining
> > report)
> > Im only capturing Time and not date/time because in manufacturing the
> > third shift reports all their production to previous day when their
> > shift began.
>
> > I cant use the DateDiff for reason above.- Hide quoted text -
>
> - Show quoted text -
SOLVED!!!
Rob, you are the man!
I've googled the heck out of this subject and even looked at forums
for a while and have found zero solutions or help.
Your expression worked perfectly!
Thanks,
Robert.
|