Show all Hide all


There is no replacement function. Use DATEPART instead, with ISO_WEEK or WEEK as the part.

Returns the week number for the specified date using a specified language week number convention.

Type: Scalar function
Area of use: General use

Return value: int

Week number as determined by the function.


@Date mandatory smalldatetime
The date to qury the week number for.
@LanguageID mandatory int
The id of the language whose week number convention should be used to compute the week number.

Specify 1 for Swedish or anything else to use Sql Server's week number convention.