Как я могу сравнить, если mytime находится между fromtime и totime :
mytime
fromtime
totime
Timestamp fromtime; Timestamp totime; Timestamp mytime;