Please, help me with this. In a query I'am trying to compare with <= and >= the timestamps but it's not working. I'am doing it like this:
select rm.room_id, rm.room_name as name2 from rooms rm, reserve rv where rm.room_id = rv.room_id and
rv.start_time < to_timestamp($ymdhm_inicio,'YYYY/MM/DD HH24:MI') and rv.end_time > to_timestamp($ymdhm_fin,'YYYY/MM/DD HH24:MI') for example.
What i'am trying to do is to verify if a date rage is content in another date range.