Oracle: how to add minutes to a timestamp?

前端 未结 13 1292
盖世英雄少女心
盖世英雄少女心 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

    like that very easily

    i added 10 minutes to system date and always in preference use the Db server functions not custom one .

    select to_char(sysdate + NUMTODSINTERVAL(10,'MINUTE'),'DD/MM/YYYY HH24:MI:SS') from dual;
    

提交回复
热议问题