greetings!

i need help about time. i use this to compute time in a cybercafe. i use excel instead of those expensive cafe monitors.

ok. this is the problem. in my cafe i have sets of rates: regular rate and happy hour rate. regular rate runs from 8AM to 10PM at 15 per hour/.25 per minute and happy hour runs from 10PM to 8AM at 10 per hour/.17 per minute. i charge a minimum of 1 hour and charged per minute thereafter.

i already have formulas for regular rate and happy hour. but what about clients logged in during regular rate and logged out at happy hour, and in less than 1 hour?

the formula should go like this:

LOG_IN = time logged in
LOG_OUT= time logged out
DURATION = length of time used
REM_MINS = number of minutes to add if duration is less than 1 hour

IF DURATION < 1HR then
ROUNDUP((10PM - LOG_IN * .25) + (LOG_OUT - 10PM * .17) + (REM_MINS * .17))
ELSE
IF DURATION >= 1HR then
ROUNDUP((10PM - LOG_IN * .25) + (LOG_OUT - 10PM * .17))
ELSE
ROUNDUP(LOG_OUT - LOG_IN * .17)

also, what about if a client logs in during happy hour and logs out during regular rate, and in less than 1 hour or more? does the above formula would still work?

hope you experts here can help.

thank you all