Oracle: how to add minutes to a timestamp?

前端 未结 13 1271
盖世英雄少女心
盖世英雄少女心 2020-11-30 02:37

I need to add 30 minutes to values in a Oracle date column. I do this in my SELECT statement by specifying

to_char(date_and_time + (.000694 * 31)

13条回答
  •  天命终不由人
    2020-11-30 03:05

    Oracle now has new built in functions to do this:

    select systimestamp START_TIME, systimestamp + NUMTODSINTERVAL(30, 'minute') end_time from dual
    

提交回复
热议问题