Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Calculation of Leap Year
Satish wrote:
> Hi ALl,
>
> IS there any way in PL/SQL to identify an year as a Leap Year?
>
> Thanks,
> Satish
CREATE OR REPLACE FUNCTION is_leap_year (yearstr VARCHAR2) RETURN BOOLEAN IS d DATE;
BEGIN
d := TO_DATE('29-FEB-' || yearstr);
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END;
/
Daniel Morgan Received on Sun Oct 10 2004 - 22:47:26 CDT