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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looping for next working date

Status
Not open for further replies.

varadha72

Programmer
Oct 14, 2010
82
0
0
US
Hi
Can someone help me here. I need to create a kind of looping formula, and this I am not sure of. I have never created one. Please help.

DB Fields-
Table- Accounts
Acct_ID Acct_Name FiscalEnd_Date
101 US Bonds 10/31/2013
102 Small Cap 6/30/2014
103 Large Cap 3/31/2014

I have a view that shows holidays for individual accounts globally (account specific)

View- V_Holidays
Acct_ID Holiday_Dates (including weekends)
1 1/1/2013 (holiday)
1 1/5/2013 (Saturday)
1 1/6/2013 (Sunday)....

Requirement-
If current date=FiscalEnd_date and if current date= Holiday then fetch the next day, check if it is a holiday, if working day then count the number of days between the FiscalEnd_Date and (Current Date +1) else step to next date, repeat until working date is reached. i.e. count number of days between the fiscalend_date and day after last nonworking day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top