SELECT TRUNC (SYSDATE, 'YEAR') "First Day of the year" FROM DUAL;
SELECT ADD_MONTHS (TRUNC (SYSDATE, 'YEAR'), 12) - 1 "Last Day of the Year" FROM DUAL;
Output:
First Day of the year
1 1/1/2021 12:00:00 AM
Last Day of the Year
1 12/31/2021 12:00:00 AM
Oracle Code:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer