Skip to Main Content
  • Questions
  • date function in oracle: find the date of a day

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, saurabh.

Asked: October 01, 2017 - 3:35 pm UTC

Last updated: October 02, 2017 - 12:18 pm UTC

Version: oracle 11g

Viewed 1000+ times

You Asked

can i find the date of a day that is on which dates saturdays of a specific month fall in oracle sql ??

and Connor said...

Something like this ?

SQL> select *
  2  from (
  3    select trunc(date '2017-10-01','MM')+rownum-1 dte
  4    from dual
  5    connect by level <= to_number(to_char(last_day(date '2017-10-01'),'DD'))
  6  )
  7  where to_char(dte,'D') = '7';

DTE
---------
07-OCT-17
14-OCT-17
21-OCT-17
28-OCT-17


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

thanks Connor McDonald

saurabh garg, October 09, 2017 - 3:51 am UTC

thank you...it is working fine.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library