Oracle: how to add minutes to a timestamp?

前端 未结 13 1212
盖世英雄少女心
盖世英雄少女心 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
    
    0 讨论(0)
提交回复
热议问题