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 2000 Forums
 Transact-SQL (2000)
 Needs to count number of days

Author  Topic 

wshtrue
Yak Posting Veteran

74 Posts

Posted - 2005-06-18 : 11:17:35
Hello Guys,
Could you tell me if my requirement is (" Today's date - application date + 2 businessdays")How should i calculate this? Based on this requirement if i have to find a number of days for Application date 5/26/2005.Can anyone help me with this? Thanks

jhermiz

3564 Posts

Posted - 2005-06-18 : 12:59:16
SELECT DATEADD(day, 2, DATEDIFF(day, yourAppDate, getdate()))



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

wshtrue
Yak Posting Veteran

74 Posts

Posted - 2005-06-18 : 14:34:41
Hi,
Thanks for your reply but does this select statement going to add only 2 businessdays and not calendar days.Thanks
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-06-18 : 15:34:17
You will have to determine what "yourAppDate" is ... do a search for business days I remember someone posting a solution to this.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

wshtrue
Yak Posting Veteran

74 Posts

Posted - 2005-06-18 : 16:35:40
Hello,
My application date is 5/26/2005 so what would be the answer for that.Do you think that your query would give me business days? What posting are you referring to? Could you please send me the link? Thanks
Go to Top of Page
   

- Advertisement -