declare 
  var_date    date;
begin
  var_date := to_date('1980-01-01','yyyy-mm-dd') + 1000;
  dbms_ourput.put_line(var_date);
end;

解决方案 »

  1.   

    谢谢骑士。那么对于1000秒能否通过sql函数转化为几小时几分几秒哪?
      

  2.   

    sorrySQL> select trunc(mod(10000/60,60))  from dual;TRUNC(MOD(10000/60,60))
    -----------------------
                         46SQL> select trunc(mod(10000,60))  from dual;TRUNC(MOD(10000,60))
    --------------------
                      40SQL>
      

  3.   

    select to_date('1980-01-01')+1000 from dual
      

  4.   

    年月日小时分秒格式
    select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
    小时分秒格式
    select to_char(sysdate,'hh24:mi:ss') from dual;