Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Calculation of Leap Year
Walt wrote:
> ats wrote:
>
>>Satish wrote:
>>>IS there any way in PL/SQL to identify an year as a Leap Year?
>>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; >>/
Good observation. Thanks.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Mon Oct 11 2004 - 22:44:09 CDT