Page 1 of 1

Fiscal Year issue

Posted: Wed Feb 02, 2011 1:46 am
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 ????

Re: Fiscal Year issue

Posted: Wed Feb 02, 2011 2:11 am
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,

Posted: Wed Feb 02, 2011 2:39 am
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.

Posted: Wed Feb 02, 2011 3:00 am
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).