Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Add return date that is 5 business from getdate()

Author  Topic 

steppinthrax
Starting Member

27 Posts

Posted - 2010-03-05 : 00:24:44
Here's what I need to do. I want to be able to calculate 5 business days based on a given date. So for example if the date is 4/4/2010 then 5 business days from there should be 4/11/2010 (not counting 4/4)

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-03-05 : 00:46:18
By business days you mean Monday to Friday or all days ?

Secondly, the data you gave in example (4/4/2010) is sunday and the output you want is also sunday (4/11/2010).

Can you please post more sample data..

Regards,
Bohra
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-03-05 : 01:16:19
quote:
Originally posted by steppinthrax

Here's what I need to do. I want to be able to calculate 5 business days based on a given date. So for example if the date is 4/4/2010 then 5 business days from there should be 4/11/2010 (not counting 4/4)





Do you have a calendar table where u define your business days?If not then please refer here.
http://visakhm.blogspot.com/2010/02/generating-calendar-table.html

PBUH
Go to Top of Page
   

- Advertisement -