select to_char(add_months(sysdate,2),'yy') from dual;

On Thu, Nov 6, 2008 at 7:25 PM, Scott <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I need help with a script in 10g.  The requirement is to create a
> string from three different variables in the following format:
> 'YY-1234-XX'  - (BTW, '1234' is irrelevant for this discussion).
>
> YY is the last two digits of the company's fiscal year, which runs
> from October 1 - September 30th.
> They are using this to track the number of projects created within
> this time frame, with the counter being represented here by 'XX.'
>
> I need to account for the fact that if a project is created between
> 10/1-12/31 of the current year, the next years two digit value is
> entered in as 'YY' and the counter clicks up one.
>
> An example:
>
> Project is created 11/1/2008.
> String would read: 09-1234-01
>
> Project is created 2/1/2009
> String would read: 09-1234-02
>
> I don't need help with the counter, I just need to know how to 'shift'
> the system date to meet the requirement.
> Any help is appreciated.
> Many thanks.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to