How to add 15 minutes to DATE in Oracle

October 16, 2019 No comments Oracle sysdate minutes QA

1. Introduction

In this short article, we will present a way to add and subtract minutes to an Oracle date column.

2. Add minutes to an Oracle date

To add minutes to an Oracle date column we can simply use + operator like in the following example:

select sysdate, sysdate + (1/1440*15) from dual;
  • sysdate + 1 is exactly one day ahead - 24 hours,

  • / 1440 divide the # of minutes in a day,

  • multiply by 15 to get the 15 minutes ahead.

Query used in above example will produce the following result (for sysdate = '2019-10-16 23:32:45');

SYSDATE SYSDATE + (1/1440*15)
2019-10-16 23:32:45 2019-10-16 23:47:45

3. Subtract minutes from Oracle date

To get 15 minutes earlier date use the following query:

select sysdate, sysdate + (1/1440*-15) from dual;

The other method to add minutes to an Oracle date is to use interval command:

select sysdate, sysdate + interval '15' minute from dual;

3. Conclusion

As we see, there are several ways to add minutes to an Oracle DATE column. In this article we presented how we can add and also substract minutes to DATE.

{{ message }}

{{ 'Comments are closed.' | trans }}