March 22, 2007 05:22 PM
DATETIME Calculations, Part 3
Calculate last/next occurrences of a weekday
Rating:

(0)
SQL Server Magazine
InstantDoc ID #95202
In my February and March columns, I talked about challenges related to datetime
calculations. I presented techniques for separating the date and time parts
of a datetime value, returning the first/last day of the month, and calculating
a language-independent weekday number. Now, I want to offer some techniques
for calculating the date of the last/next occurrences of a weekday related to
a specific date (call it the event date)—for example, calculating the
date of the most recent Monday related to today.
All...
...This article is for paid Professional Members only.
Already a Professional Member? Please log in now: