Oacle 시간의 덧셈 과 뺄셈

1937 단어 Oacle
[color=darkblue]   oracle  ,             ,       。         oracle        ,      oracle         。

      

select sysdate,add_months(sysdate,12) from dual;        -- 1   select sysdate,add_months(sysdate,1) from dual;        -- 1   select sysdate,to_char(sysdate+7,'yyyy-mm-dd HH24:MI:SS') from dual;   -- 1    select sysdate,to_char(sysdate+1,'yyyy-mm-dd HH24:MI:SS') from dual;   -- 1   select sysdate,to_char(sysdate+1/24,'yyyy-mm-dd HH24:MI:SS') from dual;  -- 1    select sysdate,to_char(sysdate+1/24/60,'yyyy-mm-dd HH24:MI:SS') from dual;  -- 1    select sysdate,to_char(sysdate+1/24/60/60,'yyyy-mm-dd HH24:MI:SS') from dual;  -- 1        

select sysdate,add_months(sysdate,-12) from dual;        -- 1   select sysdate,add_months(sysdate,-1) from dual;        -- 1   select sysdate,to_char(sysdate-7,'yyyy-mm-dd HH24:MI:SS') from dual;   -- 1    select sysdate,to_char(sysdate-1,'yyyy-mm-dd HH24:MI:SS') from dual;   -- 1   select sysdate,to_char(sysdate-1/24,'yyyy-mm-dd HH24:MI:SS') from dual;  -- 1    select sysdate,to_char(sysdate-1/24/60,'yyyy-mm-dd HH24:MI:SS') from dual;  -- 1    select sysdate,to_char(sysdate-1/24/60/60,'yyyy-mm-dd HH24:MI:SS') from dual;  -- 1   ===================================================   to_char(sid.ship_date+cst.total_times/24,'dd/mm/yyyy HH24:MI')total_times      sid.ship_date  cst.total_times      total_times

=======================================================   to_char(round(to_number(sid.sign_in_date-(sid.ship_date+cst.total_times/24))*24))t_hour      oracle     
    sid.sign_in_date  (sid.ship_date+cst.total_times/24)   to_number()     ,    round()     to_char()


    :http://oracle.chinaitlab.com/induction/846389.html
http://topic.csdn.net/t/20040913/16/3367946.html
[/color]

좋은 웹페이지 즐겨찾기