Marius Marius - 11 months ago 45
SQL Question

SQL add 2 hour to a column with type "date"

I had a column with dates, in an

statement, and i want to add 2 h to each row in this

Any advice?

Answer Source

I prefer using interval for this:

select deliverydate + interval '2' hour
from the_table;

The above is standard SQL and works well in Oracle.

More details in the manual: