We had done this by adding a Date table, where the holidayFlag column
was added which indicated 1 for a holiday and 0 for not a hooliday and
wrote a scrip which wounted the holiday flag between the date range and
deducted the same from the count of days.
-----Original Message-----
From: Adam Blumenfeld
[mailto:mssqldba-ezmlmshield-x66551113.[Email address protected]
Sent: Tuesday, July 31, 2007 6:04 AM
To: LazyDBA Discussion
Subject: Calculate Business Days Between Two Dates...
Hi all,
I've got a Holiday Table, with dates of all of our Holidays...
Does anyone have any code that will calculate the number of business
days, between two dates, by calculating the non-weekend days, and
subtracting the holidays that are in my Holiday table, but, only if they
fall during the week?
Adam
########################################################################
#############
Warning:
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to which it is
addressed. If you are not the named addressee any review, dissemination,
distribution or duplication of this e-mail is strictly prohibited. If
you have received this email in error, please let us know by e-mail and
delete it from your system. Please note that any personal views or
opinions presented in this email are solely those of the author and do
not necessarily represent those of the company.
Thank You.
########################################################################
#############
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page