Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Find First of Month
Jeroen van den Broek wrote:
> "DA Morgan" <damorgan_at_psoug.org> schreef in bericht
> news:1152739928.787663_at_bubbleator.drizzle.com...
>> FireGeek wrote: >>> Looking for an SQL statement to return the first of the month 90 days >>> following a given date. So, if my date is 04/15/2006 I would like >>> 08/01/2006 returned. >>> >>> Help anyone? >>> >>> THANKS!!! >>> >>> FireGeek >> SELECT LAST_DAY(ADD_MONTHS(SYSDATE, 2))+1 >> FROM dual; >>
SELECT LAST_DAY(ADD_MONTHS(TO_DATE('31-DEC-2006'), 2))+1 FROM dual; SELECT LAST_DAY(ADD_MONTHS(TO_DATE('31-DEC-2007'), 2))+1 FROM dual; SELECT LAST_DAY(ADD_MONTHS(TO_DATE('31-DEC-2008'), 2))+1 FROM dual; SELECT LAST_DAY(ADD_MONTHS(TO_DATE('31-DEC-2009'), 2))+1 FROM dual;
Where's the problem?
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Jul 13 2006 - 11:11:51 CDT
![]() |
![]() |