Apparently, PostgreSQL doesn\'t have DATEADD
, because you can just use the +
or -
operators.
I need to add a number of hours t
Found the answer, in another SO question:
date + interval '1' minute * FLOOR(start_time * 60)
Hope that helps anyone
If anyone wants to add in time stamp then
select time '05:00' - interval '2 hours'
The one worked for me is
SELECT date_field + interval '1' HOUR * start_time
start_time can be any numerical value.
Since you want to add hours, it should rather be:
SELECT date_field + interval '1h' * start_time
start_time
can be any numerical value.