Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Find First of Month
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
![]() |
![]() |