show data from travel where time is less than 18:30:
insert into schedules(code, datetime, street)
values('004',TO_DATE('02/01/15 17:00','DD/MM/YY HH24:MI'),'street1');
insert into schedules(code, datetime, street)
values('004',TO_DATE('02/01/15 17:30','DD/MM/YY HH24:MI'),'street2');
insert into schedules(code, datetime, street)
values('004',TO_DATE('02/01/15 18:00','DD/MM/YY HH24:MI'),'street3')
insert into schedules(code, datetime, street)
values('005',TO_DATE('01/01/15 18:00','DD/MM/YY HH24:MI'),'street4');
insert into schedules(code, datetime, street)
values('005',TO_DATE('01/01/15 18:30','DD/MM/YY HH24:MI'),'street5');
insert into schedules(code, datetime, street)
values('005',TO_DATE('01/01/15 20:00','DD/MM/YY HH24:MI'),'street6')
This query:
select *
from schedules where TO_CHAR(datetime,'HH24:MI')<'18:30');
shows all rows.