Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fiscal Year - Days Elapsed 1

Status
Not open for further replies.

socalvelo

Technical User
Jan 29, 2006
128
US
CR X1, Oracle DB

My company's fiscal year is July 1 through June 30.
I have a scheduled report which compiles budget line items for the current fiscal year and these are grouped. In each group is a percentage formula indicating how much of the budget for each line item has been used. In the report header above the percentage column I have a formula which calculates the percentage of days that have passed in the fiscal year.
//@FY_PercentElapsed
(DateDiff ("d", #07/1/2009#, currentdate))/365*100

The record selection to determine the fiscal year is this: {Table.FISCAL_YEAR} = Year(currentdate +184)

{Table.FISCAL_YEAR} has a numeric value

Since this is a scheduled report based on today's date in the current fiscal year, I would like my @FY_PercentElapsed formula to automatically calculate the percentage of 365 days from July 1 of the current fiscal year to currentdate so I don't have to manually change the date every year. I am having trouble figuring out how to use the numeric fiscal year field to go with a July 1st date value.

Thanks in advance.
 
DateDiff ("d", dateserial(year(currentdate+184)-1,7,1), currentdate))%365

Of course, a year is not actually 365 days. More like 365.25.

-LB
 
LB - thank you for such a quick response (10 minutes after I posted) and all your valuable assistance. It works perfect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top