Get date of every second Tuesday of a month
sql, t-sql
Solution
This is how you can find all 'second tuesdays' in 2013.
select
dateadd(day, 8, datediff(day, 1, dateadd(month, n, '2013-01-07')) / 7 * 7) date
from
(values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11)) t(n)
Problem
Is there a way to find out the date of every second Tuesday of a month using T-SQL syntax? E.g. in March it is the 12th, in April it's the 9th.