cursednomore said:
Here is the actual formula that I used:
Dif: IIf([In]>[shdstrt],Null,DateDiff("n",[in],[shdstrt]))
Here are 5 records of results, which have the test data in them:
EENO FName LName Date ShdStrt ShdEnd ShdLnch ShdHrs In Out Dif
2087 Ken Labenz 10/4/2004 8:00:00 AM 4:00:00 PM 1:00 7:00 8:03:00 AM 6:00:00
PM
2087 Ken Labenz 10/5/2004 8:00:00 AM 4:00:00 PM 1:00 7:00 8:06:00 AM 6:01:00
PM
2087 Ken Labenz 10/6/2004 8:00:00 AM 4:00:00 PM 1:00 7:00 8:03:00 AM 5:34:00
PM
2087 Ken Labenz 10/7/2004 8:00:00 AM 4:00:00 PM 1:00 7:00 7:55:00 AM 5:31:00
PM 5
2087 Ken Labenz 10/8/2004 8:00:00 AM 4:00:00 PM 1:00 7:00 8:03:00 AM 4:06:00
PM
As you may be able to tell, I am getting a "backwards" result.
I don't think "backwards" is what's going on here. I
suspect that your real data values for In and ShdStrt
contain more than just the formatted values displayed in
your sample data.
Is it possible that those time values also contain a date
part? It looks like In Time might be for a different day
than the ShdStrt time?? I'm guessing that you set the
vakues using the Now() function. If you're uncertain about
how those values are set, try removing the Format property
so you can see the entire value.