Unanswered: Calculating minutes in an IIF statement
I am trying to figure out the time lost. I have a start time called ITime and a duration called Minutes. The time we can bill is between 9:00 am and 10:30 am. If the event runs past the 10:30 available billing time, I only want to include the minutes before 10:30. I hope that makes sense. Here's what I have:
The ITime field is always 1/1/1900 and then the correct time. (I didn't design the database and have no control over it!!!)
It appears as if anything in the 9:00 hour is calculating on something that I can't figure out. So for instance, I have one record that starts at 10:16 with a duration of 54 minutes, and it returns 14, which is correct. But the next record starts at 9:10 with a duration of 47 minutes and it's returning 80. And I can't figure out why.
If I take the 1/1/1900 out and just leave the times, it does the opposite, gives me 47 minutes for the 9:10 event, but also gives me 54 mins for the 10:16 event. What am I doing wrong???