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

Home -> Community -> Usenet -> c.d.o.server -> Re: Find First of Month

Re: Find First of Month

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 15 Jul 2006 15:26:39 -0700
Message-ID: <1153002418.263468@bubbleator.drizzle.com>


FireGeek wrote:
> Hey Everyone,
>
> Maybe I was not so clear in my original post. I need the FIRST OF THE
> MONTH following a given number of days. This is to determine when an
> employee's pension should start and when their 401k should start.
> Also, I need to pull salary information as well but it cannot include
> the first given number of days. Thus, I am looking for the "WEEK
> NUMBER" of this new start date.
>
> So, if a HIRE_DATE = 04/03/2006 and we are looking for a 401k start
> date then it is the FIRST OF THE MONTH after 90 days.
>
> NEW START DATE = LAST_DAY(ADD_MONTHS(E.HIRE_DT, 3))+1 = 08/01/2006
>
> WEEK NUMBER = TO_CHAR(LAST_DAY(ADD_MONTHS(E.HIRE_DT, 3))+1, 'IW')
>
> But for Pension I need the FIRST OF THE MONTH following 6 months.
>
> NEW START DATE = LAST_DAY(ADD_MONTHS(E.HIRE_DT, 6))+1 = 11/01/2006
>
> WEEK NUMBER = TO_CHAR(LAST_DAY(ADD_MONTHS(E.HIRE_DT, 6))+1, 'IW')
>
>
> FireGeek

THEN SYSDATE+<number_of_days>
THEN LAST_DAY
THEN add 1

Seems to me you have more than enough information to do this now yourself. If not then please submit a Request for Proposal (RFP) and we will be on doing your work for you. ;-)

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sat Jul 15 2006 - 17:26:39 CDT

Original text of this message

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