How to remove negative timevalues?

  • Thread starter Thread starter torbein
  • Start date Start date
T

torbein

I have a query where I calculate the elapsed time by subtracting Time
Out with Time In (24H time, no date in the timevalues). The problem is
that some of the Time Out-values are not available, thus the
calculation gives me a negative timevalue.

I need to replace the negative values with BLANK so that later
calculations of median time is correct. Any one who can help me with
this?
 
Are you saying that if the TimeOut value is null, you don't want to do the
calculation? One approach would be to add a criterion to the criterion row
under TimeOut:
Is Not Null

Good luck

Jeff Boyce
<Access MVP>
 
Change your calculation column in your query to
ElapsedTime: iif(timeOut-timein < 0, Null, timeout-timein)
 
Thanks for the reply, but that is only a partial solution for me. Since
the timevalues have no date-component I still get negative values when
Time In is before midnight and Time Out is after midnight.

It is not possible for me to change the fields in the database, so it
would be best to replace the negative values with blank.
 
Back
Top