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
Learn to Develop an iPhone or iPad App in 4 Weeks Learn the latest and greatest markup language in the market with Robin Nixon(HTML & HTML5) Now $29 Only(75% Off)
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