Multiple choice technology databases

Identify the correct output --- select LAST_DAY(TO_DATE('01-SEP-1995', 'DD-MON-YYYY')) from dual;

  1. 31-AUG-1995

  2. 30-SEP-1995

  3. 31-OCT-1995

  4. 31-DEC-1995

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

LAST_DAY returns the last date of the month for any given date in that month. For September 1, 1995, it returns September 30, 1995 (September's last day). This is useful for month-end calculations. Option A shows August (previous month), not September.