I have two conditional formulas that check to see if an employee is a minor, and depending on the day of the week, checks to make sure they haven't been scheduled past 10pm or midnight.
The 10:00 check:
=IF(AND(AS7="yes",F7>TIME(22,0,0)),"yes","no") works as intended, where AS7 checks their age.
The midnight check is not going as well. I would have guessed replacing the 22 with a 24 would do the trick, but it is not.
=IF(AND(AS7="yes",F7>TIME(24,0,0)),"yes","no")
If a minor is scheduled past midnight, it still comes up as "no". I have tried TIME(0,0,0), and that does not work. I can put in TIME(23,59,59), but if the employee is scheduled at midnight, that does not violate any condition of employment, but the result is "yes" which is correct for the formula, but not what I am looking for.
Thoughts?
Bookmarks