What you need to do is apply the
TIME function to your
activitytime column and then compare it to
TIME(activitytime) BETWEEN '12:00:00' AND '16:00:00'
Note if you don’t want to include
16:00:00 replace that with
15:59:59. Also, if you write the time strings in
HH:mm:ss format then you don’t need to apply
TIME to them and can just compare directly.
CLICK HERE to find out more related problems solutions.