-
I'm still having problems with this section of code
This is what I want
I have a start time & End Time field. I'm able to calculate the total time. Example project started at 1:00PM and end at 8:00PM is 7 hours.
This is what I need though. Everything after 5:00PM I need to times is by 1.5
So I would have a calculation that does this
1:00PM to 5:00PM is 4 hours
5:00PM to 8:00PM is 4.5
everything from 5:00 to 8:00 is multiplied by 1.5
Thanks
-
Try this:
Code:
Dim a As Date, b As Date, c As Date, timeLimit As Date
a = "01:00pm"
b = "04:30pm"
timeLimit = "05:00pm"
c = b - a + IIf(b > timeLimit, (b - timeLimit) / 2, 0)
Hope it works!