programming faqs interview questions tech technical educational freshers guide preparation interviews hr telephonic
try another color:
try another fontsize: 60% 70% 80% 90%
Programming FAQs

how to get month start date and end date in oracle

Average: 4.1 (11 votes)

using trunc, sysdate and

using trunc, sysdate and add_months we can get the month start and end date

to get month start date

select trunc(sysdate, 'MM')as start_date from dual

>> to get month end date

select add_months(trunc(sysdate, 'MM'), 1) -1 as last_date from dual.

combine above two queries you will get the start and end date of the month

select trunc(sysdate,'MM') as start_date, add_months(trunc(sysdate,'MM'), 1) -1 as end_date from dual