-
Third tuesday of every month.
I need to create a query that will insert record but date should be either 1st or the 3rd tuesday of each month, what code should i use.
-
Third tuesday of every month
or you can just give me code for third Tuesday of each month.
-
Third tuesday of every month
Here is a solution:
SELECT @ResultDate = DATEADD(wk, DATEDIFF(wk,0, dateadd(dd, 18 - datepart(day,getdate()),getdate()) ), 1);
this will return me Tuesday of a specific month( in this case its system date) and if i use while loop with dateadd function i can get the result.
I hope it will help others.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|