Marius Marius - 1 year ago 61
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:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download