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: FireGeek <firegeek822_at_hotmail.com>
Date: 15 Jul 2006 11:32:13 -0700
Message-ID: <1152988333.144315.124350@m79g2000cwm.googlegroups.com>


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 Received on Sat Jul 15 2006 - 13:32:13 CDT

Original text of this message

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