question

user-91 (google) avatar image
user-91 (google) asked

Add time to a date?

Hi,

Is there a way to add a certain amount of time to a date, something similar to this:

add_time(date_col, '23:59:59')
sqltime
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andrew Mobbs avatar image
Andrew Mobbs answered

Just add a number. Each day is 1, so to add an hour:

SELECT sysdate+1/24 FROM dual;

or a minute:

SELECT sysdate+1/1440 FROM dual;
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.