Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2011
    Posts
    82

    Unanswered: Last Financial Year

    Hello

    I have the following syntex which gives me the start date of the current FY, which is 01/04/2014

    However, I am trying to now get the Start Date of the previous FY and require some assistance on this if possible

    SELECT decode(to_char(sysdate, 'Q'),
    '1', trunc(add_months(sysdate, -9), 'Q'),
    add_months(trunc(sysdate, 'YYYY'), 3))
    from dual;

    I have tried breaking it apart and testing it, but have not yet been able to get the start pf the last FY

    Any help would be greatly appreciated

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    answer is 01/04/2013
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Dec 2011
    Posts
    82
    This is the actual answer:

    SELECT decode(to_char(sysdate, 'Q'),
    '1', trunc(add_months(sysdate, -9), 'Q'),
    add_months(trunc(sysdate, 'YYYY'), -9))
    from dual;


    Thanks
    Helen

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    if your fiscal year is the f4th of january then

    select trunc(sysdate,'YEAR')+4 FROM DUAL;

    last year would be

    select add_months(trunc(sysdate,'YEAR')+4,-12) FROM DUAL;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    . . . . . . .
    Last edited by anacedent; 06-05-14 at 22:01.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •