Reputation: 11
I am trying to create a calculated field in SQL Server Reports Builder of which the output is Week Number (e.g. 1, 12, 32, 45, etc...) and am using the following expression:
=DatePart("ww",Today())
I am getting a result of "99". What am I doing wrong?
Upvotes: 1
Views: 6592
Reputation: 61
Roman Pelepei has a great Article on this.
This should do the trick.
=DatePart(DateInterval.WeekOfYear, Today())
You may have to use Now()
instead of Today()
but it will work all the same.
Upvotes: 6