How do i get the dates of a particular month using the SQL query statement?

Showing Answers 1 - 2 of 2 Answers

MANU

  • May 18th, 2006
 

Hi,

You can use date functions available to get the dates of a particular month

Ex:

SELECT col1 FROM TABLE A WHERE TO_CHAR(DATECOLUMN,'MONYY') =  'JUN05'

OR

SELECT * FROM TABLE A WHERE TO_CHAR(DATECOLUMN,'MON') =  'FEB'

Hope this was useful.....

  Was this answer useful?  Yes

rashok1983

  • May 24th, 2010
 

SELECT TO_DATE('12/01/2003', 'MM/DD/YYYY') - 1,rownum,TO_DATE('12/01/2003', 'MM/DD/YYYY') - 1 + rownum from all_objects
WHERE TO_DATE('12/01/2003', 'MM/DD/YYYY') - 1 + rownum <= TO_DATE('12/30/2003', 'MM/DD/YYYY')

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions