DATEADD equivalent in PostgreSQL
Is there an equivalent to this T-SQL command in PostgreSQL?
select dateadd(hh,duration_in_hours,start_date) as end_date
I found an interval keyword followed by a line, but this terrible construct returns a syntax error:
select start_date + interval cast(duration_in_hours as varchar) || ' hours'
It only allows the string constant after the "interval" keyword. I'm sure there must be some similar function in pgsql, but I can't find it.
+3
source to share