Postgresql – postgres timerange that goes to the next day
start time '22:00' end time '3:00' select time '22:00' - time '3:00' --result interval -18 h<br /> SELECT 24 - (abs(extract(hour from time '1:00' - time '22:00' ))) -- returns 3 finally how to create this timerange knowing that endtime…