DECLARE
V_HD EMP.HIREDATE%TYPE;
V_FM VARCHAR2(30);
V_STAR VARCHAR2(30);
BEGIN
V_FM :='&FORMAT_MASK';
V_HD:=TO_DATE('&HIREDATE',V_FM);
DBMS_OUTPUT.PUT_LINE(V_HD||CHR(10)||TO_CHAR(V_HD,V_FM));
V_STAR:= CASE WHEN V_HD BETWEEN TO_CHAR('01-01-%%%%', 'dd-mm') AND TO_CHAR('01-02-%%%%', 'dd-mm')
THEN 'YOUR STAR is capricorn'
ELSE 'any other star'
END;
DBMS_OUTPUT.PUT_LINE(V_STAR);
END
I want to avoid year from date , & get the month & day , so there star will define,,
how to ignore year ?I have to extract month & day at a time, as there are many cases for all stars in a year,