Deterministic scalar function to get week of year for a date
===

Here is a great way of how to get **day of week** for a date, [Deterministic scalar function to get day of week for a date][1].

Now, could anyone help me to create a deterministic scalar function to get **week of year** for a date please? Thanks.


  [1]: http://stackoverflow.com/questions/1803561/deterministic-scalar-function-to-get-day-of-week-for-a-date