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

  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home4/shashi/public_html/programmingfaqs.com/includes/file.inc on line 649.
  • warning: Creating default object from empty value in /home4/shashi/public_html/programmingfaqs.com/modules/fivestar/fivestar.module on line 931.
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