Home Forums SQL Server 7,2000 T-SQL Number of Mondays between two dates RE: Number of Mondays between two dates
Jesper-244176
SSCertifiable
Points: 7082
More actions
February 16, 2006 at 4:57 am
#621308
I think this will give the number of Mondays between the two dates (both inclusive). 20060213 can be replaced by any Monday...
select (datediff(d, '20060213', @Date2) + 1)/7 - datediff(d, '20060213', @Date1)/7