Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sysdate + (n) of days not returning new date

user545194Mar 23 2016 — edited Mar 23 2016

Function not returning new date:

set SERVEROUTPUT ON

declare

v_date CONSTANT DATE := sysdate;

begin

  IF v_date = TRUNC(SYSDATE+30) THEN

    dbms_output.put_line('30 days');

  ELSE

    dbms_output.put_line('other');

  END IF;

END;

returns:

other

DB version 11.2.0.2.0

Any idea why?

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2016
Added on Mar 23 2016
12 comments
323 views