Fiscal Year issue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Fiscal Year issue

Post by dr.murthy »

Hi all.

I have a small issue with julian day , usually am aware of how to calculate the julian day from date .

its give Jan1 - 1
jan2 - 2
But in my requirement Fiscal year starts from Jul1 so it should give

Jul1 -1
Jul2 - 2

Any suggestions ????
D.N .MURTHY
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Re: Fiscal Year issue

Post by jwiles »

Subtract or add the appropriate number of days to the date before converting to Julian.

For example: If July 1 2011 is the beginning of your Fiscal Year 2011, subtract 181 days (or 182 if it's a leap year). If July 1 2011 is the beginning of your Fiscal Year 2012, add 184 days. DatefromDaysSince() is the function to use.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

THanks... for reply, other than this any alternative method, since i tried this method but i had to handle leap years additionally.
D.N .MURTHY
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

You will need to handle the leap years. The only alternative is if someone has developed a fiscal-year-specific operator/parallel routine/basic routine which already handles it for you (it has to be done somewhere).
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply