time calculations

  • Thread starter Thread starter Bonnie
  • Start date Start date
B

Bonnie

Hi,

I'm struggling with a time calculation problem. Here's
the code I'm using:

=Format((([MonIN]-[MonOut])-(TimeValue("00:30"))),"Short
Time")

If I put TimeValue() in front of the MonIN/MonOut I get
an error when MonIN/MonOut is blank. Without the
TimeValue() I'm getting inconsistent results. Sometimes
correct, sometimes not.

Any ideas?

Thanks in advance.
 
Try with IIf and the TimeValue()
something like (in the air..)

IIf(IsNull(MonIn-MonOut), 0, MonIn - MonOut)
 
Thanks I'll give that a try.
-----Original Message-----
Try with IIf and the TimeValue()
something like (in the air..)

IIf(IsNull(MonIn-MonOut), 0, MonIn - MonOut)
-----Original Message-----
Hi,

I'm struggling with a time calculation problem. Here's
the code I'm using:

=Format((([MonIN]-[MonOut])-(TimeValue ("00:30"))),"Short
Time")

If I put TimeValue() in front of the MonIN/MonOut I get
an error when MonIN/MonOut is blank. Without the
TimeValue() I'm getting inconsistent results. Sometimes
correct, sometimes not.

Any ideas?

Thanks in advance.
.
.
 
Back
Top