You nailed it! Thanks a ton!!
Best Regards,
N
Nichesl
Much simpler approach would be this
DECLARE @EndDateTime DATETIME = '8/25/2014'
DECLARE @StartDateTime DATETIME = '8/3/2014'
SELECT DATEDIFF(dd,0,@EndDateTime)/7 - DATEDIFF(dd,0,@StartDateTime)/7 +1
Also it works independent of LANGUAGE settings
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://ift.tt/19nLNVq http://ift.tt/1iEAj0c
No comments:
Post a Comment