Don't be confused, think about what the logic needs to be.
If "time" - however that is expressed, eg. string, int, etc. is "something" then "do this".
The "something to something" suggests you want a "between".
In code, "between" is typically written as a "greater than this and less than that".
I find that once I can write something in non-code English so it makes sense and looks OK I can write the code for it more easily. Give that a try (writing the logic in non-code) and see how you do.