How to add a variable number of hours to a date in PostgreSQL?
Solution 1:
Since you want to add hours, it should rather be:
SELECT date_field + interval '1 hour' * start_time
start_time
can be any numerical value.'1 hour'
can be shortened to '1h'
.interval
can be multiplied by a scalar.
Solution 2:
Found the answer, in another SO question:
date + interval '1' minute * FLOOR(start_time * 60)
Hope that helps anyone