Home | User-Defined Functions | Tips & Tricks | SQL Server 2005 | Forums | Frequently Asked Questions | Practice Test |    
SQL Server Helper Forum
SQL Server Helper Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000/2005
 Analysis Services
 give me some solution
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic   

shivnandan

India
1 Posts

Posted - 12/21/2006 :  23:09:45  Show Profile  Reply with Quote
i need second and fourh sutarday of a month between two dates i have two dates 1/12/2006 to 30/12/2006 second sutarday and four sutarday between this date.

sshelper

USA
110 Posts

Posted - 12/29/2006 :  09:04:27  Show Profile  Visit sshelper's Homepage  Reply with Quote
The second Saturday of a month will always fall between the 8th and 14th of that month and the fourth Saturday of a month will always fall between the 22nd and 28th of that month. Given this, what you can do is to create a user-defined function that will loop through these date ranges and look for the Saturday and return that date.
Go to Top of Page

Peso

21 Posts

Posted - 08/17/2007 :  11:58:41  Show Profile  Visit Peso's Homepage  Reply with Quote
See this article
http://www.sqlservercentral.com/columnists/plarsson/howmanymoremondaysuntiliretire.asp
Go to Top of Page
  Previous Topic Topic   
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
   
SQL Server Helper Forum © 2006 SQL Server Helper Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06