setMinimalDaysInFirstWeek / getMinimalDaysInFirstWeek

  • the statement

    SELECT

    DATEPART(yyyy, my_date) AS my_year

    , DATEPART(ww, my_date) AS my_week

    FROM

    my_table

    returns

    - my_year: 2005, my_week: 1, for my_date: 01/01/2005

    - my_year: 2005, my_week: 2, for my_date: 01/03/2005

    server details:

    - product version: 8.00.760 (sp3)

    - language: English (USA)

    - server collation: Latin1_General_CI_AS

    Is there any chance to configure something like 'setMinimalDaysInFirstWeek'?

    Within our timezone ... getTimeZone("Europe/Berlin"), locale.GERMAN) ... the first week of a year starts with the first week with a minimum of 4 days in it. That means: week of '01/03/2005' should return 2.

  • Have you seen today's article?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply