using last_day, add_months and trunc function we can calculate the year start/end date.
eg: to get the first day of the year
select trunc(sysdate, 'YYYY') from dual
eg: To get the last day of the year
select last_day(add_months(trunc(sysdate,'YYYY'), 11)) from dual
Combine above two queries u will get the start and end day of the year
using last_day, add_months
Mon, 12/08/2008 - 18:58 — adminusing last_day, add_months and trunc function we can calculate the year start/end date.
eg: to get the first day of the year
select trunc(sysdate, 'YYYY') from dual
eg: To get the last day of the year
select last_day(add_months(trunc(sysdate,'YYYY'), 11)) from dual
Combine above two queries u will get the start and end day of the year
select last_day(add_months(trunc(sysdate,'YYYY'), 11)) from dual