Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL LAST_DAY Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: LAST_DAY

Definition:
The Oracle PL/SQL LAST_DAY function returns the last day of the month extracted from the provided date value argument. It accepts argument of DATE type and returns argument of DATE type. The LAST_DAY function is often used to determine leap years by checking the month of February for that year to see if it had the extra day present in a leap year.

Example Syntax:

LAST_DAY (date);


Example Usage:

This example finds the last day in February, 2004. It returns '29' for the date because 2004 was a leap year.

SELECT LAST_DAY('16-FEB-2004') Last_Day
FROM DUAL;

LAST_DAY
---------------
29-FEB-04



Related Links:

Related Code Snippets:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 118 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?