In SQL Statement in microsoft sql server, there is a built-in function to get week number but it is the week of the year.
Select DatePart(week, \'2012/11/30\
Try Below Code:
declare @dt datetime='2018-03-15 05:16:00.000' IF (Select (DatePart(DAY,@dt)%7))>0 Select (DatePart(DAY,@dt)/7) +1 ELSE Select (DatePart(DAY,@dt)/7)