DECLARE v_current_date DATE; v_current_day NUMBER(2); v_current_month VARCHAR(10); BEGIN v_current_date := SYSDATE; v_current_day := v_current_date,'DD'; v_current_month := TO_CHAR(v_current_date,'Month'); IF v_current_day >= 1 AND v_current_day <=10 THEN DBMS_OUTPUT.PUT_LINE('It is Day '||v_current_day||' of '||v_current_month||'.'); DBMS_OUTPUT.PUT_LINE('It is early in the month.'); ELSIF v_current_day >=11 AND v_current_day <=20 THEN DBMS_OUTPUT.PUT_LINE('It is Day '||v_current_day||' of '||v_current_month||'.'); DBMS_OUTPUT.PUT_LINE('It is the middle of the month.'); ELSIF v_current_day >=21 AND v_current_day <=31 THEN DBMS_OUTPUT.PUT_LINE('It is Day '||v_current_day||' of '||v_current_month||'.'); DBMS_OUTPUT.PUT_LINE('It is nearly the end of the month.'); ELSE DBMS_OUTPUT.PUT_LINE('Cannot determine day and month.'); END IF; END; /