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 week start date and end date in oracle

Average: 4.6 (10 votes)

We can get it using to_char

We can get it using to_char function in oracle

eg: To get current day
select to_char(sysdate) today from dual

eg: to get start day of week
select to_char(sysdate+ (1-to_char(sysdate,'D'))) startdayofweek from dual

eg: to get end day of the week
select to_char(sysdate+ (7-to_char(sysdate,'D'))) endofweek
from dual

eg: to get start and end date of week

select to_char(sysdate+ (1-to_char(sysdate,'D'))) startdayofweek, to_char(sysdate+ (7-to_char(sysdate,'D'))) endofweek from dual