How To Calculate the Number of Week Days Between two Dates
(total difference in days) - (total difference in weeks) * 2
or
DateDiff(dd, @start, @end) - DateDiff(ww, @start, @end)*2
... since the DateDiff() function with weeks returns the number of week "boundaries" that are crossed; i.e., the number of weekends.
If you have a table of holidays, then you can simply subtract them out as well:
DateDiff(dd, @start, @end) -
DateDiff(ww, @start, @end)*2 -
(select count(*) from holidays where holiday_date between @start and @end)
DateDiff(ww, @start, @end)*2 -
(select count(*) from holidays where holiday_date between @start and @end)
Now, what if the start day or the end day is on a weekend? In that case, you need to define what to do in those situations in your requirements.
For example, if the start date is Sunday, Nov 20th, and the end day is Monday, Nov 21st -- how many week days are between those dates? There's no universal correct answer; it could be 0, or 1, or perhaps even "undefined" (null) depending on your needs.
Buy:Lipitor.SleepWell.Advair.Zetia.Female Pink Viagra.Amoxicillin.Prozac.Zocor.Wellbutrin SR.Lasix.Cozaar.Ventolin.Female Cialis.Acomplia.Buspar.Nymphomax.Seroquel.Benicar.Aricept.Lipothin….
Buy:Prednisolone.Zovirax.Retin-A.Accutane.Actos.Valtrex.Prevacid.Mega Hoodia.Zyban.Petcam (Metacam) Oral Suspension.Arimidex.Lumigan.Synthroid.100% Pure Okinawan Coral Calcium.Nexium.Human Growth Hormone….
Buy:Prevacid.Accutane.Actos.Zyban.Lumigan.Arimidex.Mega Hoodia.Human Growth Hormone.Prednisolone.100% Pure Okinawan Coral Calcium.Petcam (Metacam) Oral Suspension.Zovirax.Nexium.Synthroid.Retin-A.Valtrex….
…
BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…
Cialis discount…
Buyno prescription…
purchase@effexor.now” rel=”nofollow”>.…
Buyno prescription…
Depakote@official.site” rel=”nofollow”>..…
Buygeneric meds…
Zyvox…
Buydrugs without prescription…
Zyrtec…
Buydrugs without prescription…
xeloda…
Buynow…
xeloda bleeding…
Buygeneric meds…
Zoloft…
Buygeneric drugs…
Voltaren…
Buyno prescription…
Xenical…
Buynow…
Vitamin E…
Buynow…
Yaz…
Buygeneric drugs…
do@you.need.to.fast.for.prograf.levels” rel=”nofollow”>……
Buywithout prescription…
.…
Buydrugs without prescription…
purpose@of.advair” rel=”nofollow”>.…
Buygeneric meds…
if@you.are.allergic.to.ceclor.can.you.take.augmentin” rel=”nofollow”>……
Buywithout prescription…
how@long.does.abilify.stay.in.your.system” rel=”nofollow”>……
Buywithout prescription…
bulk@coral.calcium.powder” rel=”nofollow”>..…
Buygeneric drugs…
does@clonidine.and.lamisil.interaction” rel=”nofollow”>..…
Buywithout prescription…
sexual@side.effects.of.lexapro.vs.paxil” rel=”nofollow”>..…
Buynow it…
aciphex@vs.nexium” rel=”nofollow”>..…
Buygeneric drugs…
pulmicort@or.xopenex.first.when.using.both” rel=”nofollow”>……
Buyit now…
where@to.buy.acai.berry.zen” rel=”nofollow”>……
Buyno prescription…
flomax@in.dogs” rel=”nofollow”>.…
Buyit now…
..…
Buynow it…
Order@Cheap.Abana” rel=”nofollow”>..…
Buynow it…
Buy@Abilify.Online” rel=”nofollow”>..…
Buygeneric meds…
Buy@Cheap.Abilify” rel=”nofollow”>..…
Buynow it…
Purchase@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>.…
Buynow it…
Order@Generic.Acai” rel=”nofollow”>..…
Buywithout prescription…
Purchase@Cheap.Abilify” rel=”nofollow”>……
Buywithout prescription…
Get@Abilify.Online” rel=”nofollow”>..…
Buyit now…
Buy@Cheap.Acai” rel=”nofollow”>.…
Buywithout prescription…
Order@Acai.Online” rel=”nofollow”>……
Buynow it…
Order@Acai.Online” rel=”nofollow”>……
Buyit now…
Purchase@Discount.Acai” rel=”nofollow”>……
Buygeneric drugs…
Cheap@Acai.Online” rel=”nofollow”>……
Buynow…
Purchase@Discount.Energy.Boost” rel=”nofollow”>.…
Buynow it…
Buy@Cheap.Accupril” rel=”nofollow”>.…
Buygeneric meds…
Purchase@Accupril.Online” rel=”nofollow”>.…
Buygeneric drugs…
Buy@Cheap.Aciphex” rel=”nofollow”>.…
Buygeneric meds…
Cheap@Actonel.Without.Prescription” rel=”nofollow”>……
Buynow it mou…
Buy@Cheap.Actoplus.Met” rel=”nofollow”>..…
Buygeneric meds qmo…
Buy@Generic.Abilify.Without.Prescription” rel=”nofollow”>..…
Buynow it tly…
Buy@Generic.Acai” rel=”nofollow”>.…
Buygeneric drugs mby…
Cheap@Generic.Acai” rel=”nofollow”>……
Buydrugs without prescription vrg…
Order@Cheap.Energy.Boost” rel=”nofollow”>..…
Buyno prescription wkp…
Order@Discount.Energy.Boost” rel=”nofollow”>..…
Buyno prescription gdt…
Order@Cheap.Aciphex” rel=”nofollow”>..…
Buydrugs without prescription faj…
Purchase@Discount.Aciphex” rel=”nofollow”>..…
Buyno prescription jui…
Buy@Actonel.Online” rel=”nofollow”>..…
Buydrugs without prescription hak…
Order@Cheap.Actonel” rel=”nofollow”>.…
Buygeneric drugs nih…
Purchase@Actonel.Online” rel=”nofollow”>……
Buygeneric drugs vbr…
Purchase@Cheap.Actonel” rel=”nofollow”>.…
Buydrugs without prescription xab…
Order@Discount.Advair” rel=”nofollow”>..…
Buyno prescription tao…
Get@Aggrenox.Online” rel=”nofollow”>……
Buynow fjl…
Order@Cheap.Albenza” rel=”nofollow”>……
Buynow it sxk…
risperdal@vs.abilify” rel=”nofollow”>.…
Buygeneric drugs…
allegra@generic.purchase” rel=”nofollow”>……
Buynow…
……
Search music now US Charts…
sleep aids and half-life…
Buy_it now…
adhd drugs causing hallucinations…
Buy_generic meds…
number of obese in this generation…
Buy_generic meds…
aspirin pain relief dog…
Buy_drugs without prescription…
drug alcohol prevention resilience…
Buy_it now…
research being done to treat hiv…
Buy_generic pills…
serotonin natural sources…
Buy_generic meds…
nursing drug study website…
Buy_drugs without prescription…
planar warts…
Buy_drugs without prescription…
stop smoking phlegm…
Buy_drugs without prescription…
what foods anorexia eat…
Buy_drugs without prescription…
nexium pepsin ac…
Buy_generic drugs…
will the recession become a depression…
Buy_without prescription…
teen girl 16 18.6 bmi…
Buy_generic drugs…
acne scar and pit lamp…
Buy_generic drugs…
synephrine hcl diet pills…
Buy_generic pills…
terry abbot…
Buy_generic drugs…
benicar hct and norvasc…
Buy_it now…
macon georgia drug court…
Buy_without prescription…
canadian@pharmacy.valtrex” rel=”nofollow”>……
Buygeneric meds…