picnichouse Posted November 15, 2005 Posted November 15, 2005 Hi, I need to make a field that shows the number of working days in the current month. That means if it's January 5th, it counts the number of mondays through fridays in january and subtracts any holidays, if they're weekdays, i.e. jan 1st. Any way to do this? Thanks, Andrew
Oldfogey Posted November 16, 2005 Posted November 16, 2005 Holidays mess you up for any calculation because they vary. Depending on how you want to use this info and how often you are prepared to update it, I'd be inclined to use a table with the info already hand-calculated. You can then update the table for each month as that month is passed or at the end of the year. Another less aesthetic solution would be a simple(?) Case statement, which you'd have to update in the same way.
comment Posted November 16, 2005 Posted November 16, 2005 See this thread for the first part. Regarding holidays, the question is (a) which holidays, and ( if a holiday falls on a weekend, is there an alternate day off? If you're talking about US Federal holidays, and the answer to ( is yes, then it should be easy: with the exception of New Year's Day, holidays are always in the same month, so the number of holidays in a particular month is constant.
Dana G Posted November 17, 2005 Posted November 17, 2005 Database Pros I was looking thru the Tip File on Database Pros website and ran across something that may help you. Search Resources for "Work and Holidays".
Inky Phil Posted November 17, 2005 Posted November 17, 2005 Isn't New years Day always in January??? Puzzled Phil
comment Posted November 17, 2005 Posted November 17, 2005 Context is everything, Phil. If New Year's Day falls on a Saturday, then Friday (December 31) "may be observed as a holiday by various institutions"- see here.
Inky Phil Posted November 17, 2005 Posted November 17, 2005 Context is indeed everything comment. If New years Day fell on a Saturday then over here in the UK we would probaly take the week in between Christmas Day and New Years day off and then because NYD fell on a Saturday we would take the Monday off as well. They never said life was going to be easy..... Phil
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now