Search results
This tutorial shows you how to use Oracle LAST_DAY() function to get the last day of the month of a specified date and gives you some practical examples.
16 mar 2013 · Oracle has a last_day() function: SELECT LAST_DAY(to_date('04/04/1924','MM/DD/YYYY')) from dual; SELECT LAST_DAY(ADD_MONTHS(to_date('04/04/1924','MM/DD/YYYY'), -1)) from dual; SELECT LAST_DAY(ADD_MONTHS(to_date('04/04/1924','MM/DD/YYYY'), -2)) from dual; Results:
LAST_DAY. To see the last date of the month of a given date, Use LAST_DAY function. select LAST_DAY(sysdate) from dual; LAST_DAY-----31-AUG-2003 . NEXT_DAY. To see when a particular day is coming next , use the NEXT_DAY function. For Example to view when next Saturday is coming, give the following query. select next_day(sysdate) from dual; NEXT_DAY
29 lut 2016 · Extract a value of a date time field e.g., YEAR, MONTH, DAY, … from a date time value. Gets the last day of the month of a specified date. Return a TIMESTAMP value that represents the current date and time in the session time zone. Return the number of months between two dates. Get the first weekday that is later than a specified date.
27 maj 2023 · The LAST_DAY function returns the last day of the month of the specified date value. You supply a date, and another date is returned which is the last day of the month. The syntax is: LAST_DAY (input_date) Let’s see an example: SELECT SYSDATE, LAST_DAY(SYSDATE) AS last_of_month FROM dual;
14 kwi 2022 · In Oracle Database we can use the LAST_DAY() function to return the last day of a given month. This can be the last day of the current month or the last day of month based on a specified date. Example SELECT LAST_DAY(date '2035-02-15') FROM DUAL; Result: 28-FEB-35. The last day of the month is defined by the session parameter NLS_CALENDAR.
This Oracle tutorial explains how to use the Oracle / PLSQL LAST_DAY function with syntax and examples. The Oracle / PLSQL LAST_DAY function returns the last day of the month based on a date value.