July 5, 2012 at 5:14 am
Hi all
Need a function to generate the no. of working days in the Fiscal Year
Thanks
Alok
July 5, 2012 at 5:22 am
Maybe this will help
July 5, 2012 at 5:25 am
Create a calendar table with a row for each date, and include a column that indicates if a date is a working day or not.
Then you can just run a query in the function to count the days that are working days.
July 5, 2012 at 5:46 am
Excellent article here on SSC
4-4-5 Calendar Functions, Part 1
By Cliff Corder, 2010/09/06 (first published: 2009/09/28)
July 5, 2012 at 7:00 am
Michael Valentine Jones (7/5/2012)
Create a calendar table with a row for each date, and include a column that indicates if a date is a working day or not.Then you can just run a query in the function to count the days that are working days.
I think that would be an awful lot of manual work. The table would require a lot of updating.
Then again, OP, are you accounting for Snow Days, Hurricane Days, etc.?
July 5, 2012 at 11:33 pm
Brandie Tarvin (7/5/2012)
Michael Valentine Jones (7/5/2012)
Create a calendar table with a row for each date, and include a column that indicates if a date is a working day or not.Then you can just run a query in the function to count the days that are working days.
I think that would be an awful lot of manual work. The table would require a lot of updating.
Then again, OP, are you accounting for Snow Days, Hurricane Days, etc.?
I am not sure how you can say it would be a lot of manual work, since the OP supplied absolutely no information on how their fiscal year and working days are defined.
It's possible that the table could be populated with a simple algorithim, but who knows?
Since the definition of fiscal year and working day varies widely from one organization to another, I doubt anyone can supply a more specific answer without additional information from the OP.
July 6, 2012 at 4:28 am
Michael Valentine Jones (7/5/2012)
Brandie Tarvin (7/5/2012)
Michael Valentine Jones (7/5/2012)
Create a calendar table with a row for each date, and include a column that indicates if a date is a working day or not.Then you can just run a query in the function to count the days that are working days.
I think that would be an awful lot of manual work. The table would require a lot of updating.
Then again, OP, are you accounting for Snow Days, Hurricane Days, etc.?
I am not sure how you can say it would be a lot of manual work, since the OP supplied absolutely no information on how their fiscal year and working days are defined.
Speaking from experience, your suggestion of creating a table is not a "load and forget" kind of thing. Even assuming that the OP loads the table with every date in existence when he first creates the table, he then has to have a regular maintenance task on his calendar at least once a year, if not several times a month, to fix items that have changed. Most workplaces only notify people of company holidays a month in advance of a new year, then you have days where the office gets closed due to natural disasters (snow days, hurricane closures, fires, etc.), and then days where a weekend suddenly becomes a working day.
It is a headache of maintenance. We have a similar kind of table at my workplace which I dislike intensely because now it's migrated into 3 different systems, which means I have to do 3 times the work to maintain it.
But, the OP may be forced to do the maintenance regardless of whatever choice he makes on a solution. The more I think about it, the less I can see a way around the "fixing".
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply