Results 1 to 4 of 4

Thread: adding days

  1. #1
    Join Date
    Jan 2002
    Posts
    77

    Unanswered: adding days

    is there a single row functions to add days to a particular day

    for example I tried

    select add_days(sysdate,90) from dual;


    and oracle didn't recognize the function.

    thanks

  2. #2
    Join Date
    Sep 2002
    Location
    Finland
    Posts
    34

    Re: adding days

    Originally posted by vld
    is there a single row functions to add days to a particular day

    for example I tried

    select add_days(sysdate,90) from dual;


    and oracle didn't recognize the function.

    thanks
    There is add_months-function but I think there is not add_days-fuction.

    Could you use add_month-function or select sysdate + 90 from dual?

  3. #3
    Join Date
    Aug 2001
    Posts
    66

    Re: adding days

    There is no ADD_DAYS function because Oracle date arithmetic is day-based, i.e. SYSDATE plus ninety days is (as mns rightly says) SYSDATE + 90.
    Padderz
    SYSOP, Quest Software / RevealNet Labs PL/SQL Pipeline

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296

    Re: adding days

    Originally posted by padderz
    There is no ADD_DAYS function because Oracle date arithmetic is day-based, i.e. SYSDATE plus ninety days is (as mns rightly says) SYSDATE + 90.
    Correct.

    If I want 30 days ago:
    select sysdate-30 from dual;

    If I want 30 HOURS ago:
    SELECT SYSDATE-(30/24) FROM dual;
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •