October 19, 2012 at 6:50 am
Hi All,
I'm looking for a way to create a query or function that calculates the number of working days in the current month. For example if I were to run the query today, it would produce the output enclosed in the excel spreadsheet
Any help or feedback would be most welcome.
Thanks
October 19, 2012 at 7:22 am
Hi
The easiest way to achieve this is too use a calendar table with a isWorkingDay or some such column you can then just use on this based on the current month and count the working days
Here is a quick example, there are loads on the interweb..
http://stackoverflow.com/questions/5635594/how-to-create-a-calender-table-for-100-years-in-sql
Andy
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
October 19, 2012 at 8:26 am
Thanks for the pointer, I have found some good calendar table creation examples.
Regards
Dan
October 19, 2012 at 8:41 am
No Probs 🙂
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply