Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to calculate Last and First Day of Month?
First day calculations;
select last_day(add_months(sysdate,-1))+1 form dual; for current month
1st day.
select last_day(add_months(sysdate,-1)) from dual ; for end of
previous month.
ROR
>>> stant_98_at_yahoo.com 01/23/02 10:35AM >>>
Hey guys,
I know this is propablby easy, but I'm a bit overwhelmed here this week. Can you please tell me how to get first and last days of the month given SYSDATE?
thanks a lot
Regards
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Viktor INET: stant_98_at_yahoo.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ron Rogers INET: RROGERS_at_galottery.org Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jan 23 2002 - 16:14:04 CST