Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to get the month part of an Oracle date field?

How to get the month part of an Oracle date field?

From: sherifffruitfly <sherifffruitfly_at_gmail.com>
Date: 19 Mar 2007 15:38:01 -0700
Message-ID: <1174343881.152095.119470@e65g2000hsc.googlegroups.com>


Hi all,

To give me the total number of workdays in a month, I'm trying to write a query along the following lines:

SELECT COUNT(something_not_null)

FROM table_with_dates_and_holidays

WHERE

	is_weekday = 1 AND
	is_not_holiday = 1 AND
	the_month_part_of_AS_OF_DATE = [1-12] or [Jan-Dec] or [what the hell
ever]

The field as_of_date is a date field. How do I get the month-part of it, to test for equality with the input?

Thanks for any hints,

cdj Received on Mon Mar 19 2007 - 17:38:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US